Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
I've got a measure which calculate in a wrong way. I believe its not hard for advanced pbi users, but the little description of how to handle that for the future would be benefitial for me
Try to calculate every row which has RESOLVED collumn filled and is from Category1 + Category2.
I've break down this measure into two pieces to let it be easier to understood and here they are
Cat1 = CALCULATE(
Cat2 = CALCULATE(
CatTot = CALCULATE(
CatTot = CALCULATE(
Solved! Go to Solution.
You need to include all the filter expressions in the NOT clause:
blogunder15-30 =
CALCULATE (
COUNTROWS ( 'data' ),
FILTER (
'data',
NOT ( 'data'[CATEGORIES]
IN { "CAT", "CAT2" }
&& 'data'[blogdays] >= 15
&& 'data'[blogdays] < 30 )
)
)
Try to simplify:
blogunder15-30 =
CALCULATE (
COUNTROWS ( 'data' ),
FILTER (
'data',
NOT ( 'data'[CATEGORIES] IN { "CAT", "CAT2" } )
&& 'data'[blogdays] < 15
)
)
Proud to be a Super User!
The OR clause (||) needs to be enclosed in parentheses. Or, you can write it this way:
CatTot =
CALCULATE (
COUNTROWS (
FILTER (
'data',
'data'[RESOLVED] <> BLANK ()
&& 'data'[CATEGORIES] IN { "CAT1", "CAT2" }
)
)
)
Proud to be a Super User!
Thanks. It works now. I'll later accept this as solution. Can you perhaps help me in this query
You need to include all the filter expressions in the NOT clause:
blogunder15-30 =
CALCULATE (
COUNTROWS ( 'data' ),
FILTER (
'data',
NOT ( 'data'[CATEGORIES]
IN { "CAT", "CAT2" }
&& 'data'[blogdays] >= 15
&& 'data'[blogdays] < 30 )
)
)
Try to simplify:
blogunder15-30 =
CALCULATE (
COUNTROWS ( 'data' ),
FILTER (
'data',
NOT ( 'data'[CATEGORIES] IN { "CAT", "CAT2" } )
&& 'data'[blogdays] < 15
)
)
Proud to be a Super User!