Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
I was trying to re-create 4 measures from Excel that uses Countifs ...
WIP - Inside SLA = COUNTIFS(Export!$B:$B,"<="&RM!G$5+1,Export!$C:$C,">="&RM!G$5+1,Export!$D:$D,">"&RM!G$5+1,Export!$E:$E,IF($E6="","*",RM!$E6))+
COUNTIFS(Export!$B:$B,"<="&RM!G$5+1,Export!$C:$C,">="&RM!G$5+1,Export!$D:$D,"",Export!$E:$E,IF($E6="","*",RM!$E6))
WIP - Failed SLA = =COUNTIFS(Export!$B:$B,"<="&RM!G$5+1,Export!$C:$C,"<"&RM!G$5+1,Export!$D:$D,">"&RM!G$5+1,Export!$E:$E,IF($E6="","*",RM!$E6))
+COUNTIFS(Export!$B:$B,"<="&RM!G$5+1,Export!$C:$C,"<"&RM!G$5+1,Export!$D:$D,"",Export!$E:$E,IF($E6="","*",RM!$E6))
Closed - Pass SLA = =COUNTIFS(Export!$D:$D,"<="&RM!G$5+1,Export!$D:$D,">"&RM!F$5+1,Export!$E:$E,IF($E6="","*",RM!$E6),Export!$F:$F,"pass")
Closed - Fail SLA = =COUNTIFS(Export!$D:$D,"<="&RM!G$5+1,Export!$D:$D,">"&RM!F$5+1,Export!$E:$E,IF($E6="","*",RM!$E6),Export!$F:$F,"fail")
Here are the desired results. The ones highlighted in yellow.
I tried to build a date dimension together with my fact table and create relationship in between.
I tried to create a couple of approaches but it looks like I am missing something in my DAX.
The result that I get is perfect in measure called New but almost close to the other shown above vs the desired results.
Each measure has it's own criteria that goes with a specific date field inside the fact table like Submitted, Target and Close Dates.
Do you guys have an idea what I am missing? Any idea or suggestion is highly appreciated!
For quick reference Here's the link Power BI
Sample PBIX and Excel File ( for the desired Results )
Forget Excel. Describe your business rules .
Avoid nesting measures. For example:
_Closed - Pass SLA =
VAR _weekending = MAX('Dates'[Week Ending Date])
RETURN COALESCE(CALCULATE(
COUNTROWS(Test),
'Test'[Pass/Fail] = "Pass",
'Test'[Close Out Date] <= _weekending,
USERELATIONSHIP(Dates[Date],Test[Close Out Date])
),0)
@lbendlin - I know getting a concrete understanding about the process would be valuable.
Just a question please. When you say "Avoid nesting Measures" What do you mean by that?. I saw you paste a measure that has a several DAX on it. Is that the one you are pertaining at?
You used CALCULATE([_test Close Date],..) which I replaced by CALCULATE(COUNTROWS(Test),...) - that makes it clearer what is happening, and avoids confusion on context transitions.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
82 | |
71 | |
49 |
User | Count |
---|---|
143 | |
121 | |
111 | |
59 | |
57 |