Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a database that contains details on various countries, such as Australia, Hong Kong, and Alerts. I need a Power BI DAX calculation/column that

I have a database that contains details on various countries, such as Australia, Hong Kong, and Alerts. I need a Power BI DAX calculation/column that will allow me to count all the various countries in a table/matrix, and then thereafter take out the Alerts value, and add it to the other values in the table by the % split. It should look something like the attached picture. I need to end up with something like the Final Allocation and Final % columns. Thank you very much. image text in transcribed I have entered the below mentioned DAX calculations, but they appear not to be working. Can you please review and advise.

Count All Tickets = 1

# of tickets =

IF (

NOT( ISBLANK( [New Requester Location] ) ),

IF (

[New Requester Location] = "Alerts",

BLANK(),

[Count All Tickets]

),

BLANK()

)

Final Allocation =

VAR TotalTickets = SUM('All Tickets'[Count All Tickets])

VAR AlertsTickets = CALCULATE(SUM('All Tickets'[Count All Tickets]), FILTER( ALL( 'All Tickets'[New Requester Location] ), 'All Tickets'[New Requester Location] = "Alerts"))

VAR CountryTickets = SUM([# of tickets])

RETURN IF(NOT(ISBLANK([New Requester Location])), IF([New Requester Location] = "Alerts", AlertsTickets * (CountryTickets / TotalTickets), CountryTickets), BLANK())

Final % =

VAR TotalTickets = SUM([Count All Tickets])

VAR AlertsTickets = CALCULATE(SUM([Count All Tickets]), FILTER(ALL('All Tickets'[New Requester Location]), 'All Tickets'[New Requester Location] = "Alerts"))

VAR CountryTickets = SUM([# of tickets])

RETURN IF(

NOT( ISBLANK([New Requester Location])),

IF(

[New Requester Location] = "Alerts",

AlertsTickets / TotalTickets,

CountryTickets / TotalTickets

),

BLANK()

)

A circular dependency was detected: All Tickets[Final %], All Tickets[Final Allocation], All Tickets[Final %].

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

ISBN: 133405680, 9780133547702 , 978-0133405682

Students also viewed these Databases questions

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago