Question: 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. I have a database that contains details on various countries, such as 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!