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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started