Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I'm currently trying to recreate a data set that I had set up using MySQL in another BI solution as a new table in DAX in PowerBI. I was able to set up the following (DAX.1) without any filtering capabilities based on the SQL but I'm having a lot of trouble figuring out how to incorporate my desired categorical columns into this table. The goal here is to get total cases opened and closed by day with the ability to add filters by the Support Tier and Case Type. I'll then add measures to calculate a total case balance (Cases Opened - Cases Closed) and total ending backlog value by day.
DAX.1: Working table with no categories
CaseInOut = FILTER(ADDCOLUMNS( SUMMARIZE('Created Date Dimensions','Created Date Dimensions'[Date]), "Cases Opened", SUMX('Cases', IF(AND('Cases'[CreatedDate - Date Only].[Date] >= 'Created Date Dimensions'[Date],'Cases'[CreatedDate - Date Only].[Date] < DATEADD('Created Date Dimensions'[Date],1,DAY)) ,1,0)), "Cases Closed", SUMX('Cases', IF(AND('Cases'[ClosedDate - Date Only].[Date] >= 'Created Date Dimensions'[Date],'Cases'[ClosedDate - Date Only].[Date] < DATEADD('Created Date Dimensions'[Date],1,DAY)) ,1,0)) ), AND('Created Date Dimensions'[Date] < TODAY(),'Created Date Dimensions'[Date] > MIN('Cases'[CreatedDate - Date Only].[Date])))
I'm trying to group this data by the following two columns: 'Cases'[Support Tier], 'Cases'[Type]
DAX.2: Attempt to use SUMMARIZE that is not working as expected
CaseInOut2 =
FILTER(
SUMMARIZECOLUMNS(
'Created Date Dimensions'[Date],
'Cases'[Support Tier],
'Cases'[Type],
"Cases Opened",
SUMX('Cases',
IF(AND('Cases'[CreatedDate - Date Only].[Date] >= 'Cases'[CreatedDate - Date Only],'Cases'[CreatedDate - Date Only].[Date] < DATEADD('Created Date Dimensions'[Date],1,DAY))
,1,0)),
"Cases Closed",
SUMX('Cases',
IF(AND('Cases'[ClosedDate - Date Only].[Date] >= 'Cases'[CreatedDate - Date Only],'Cases'[ClosedDate - Date Only].[Date] < DATEADD('Created Date Dimensions'[Date],1,DAY))
,1,0))),
AND('Created Date Dimensions'[Date] < TODAY(),'Created Date Dimensions'[Date] > MIN('Cases'[CreatedDate - Date Only].[Date])))
I'm pretty new to DAX so I'm not sure if what I have currently is actually very efficient, any suggestions would be greatly appreciated.
Desired end result is to have a chart like this which can be filtered by Tier and Type:
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |