Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Dear all,
I have two measures. I want to count the number of [measure 1] that the measure 2's result is 0
When I use measure 1 as a card view and put measure 2 to a filter(set=0) which works fine.
However when I want to combine those two into one measure, it give wrong result(blank) as below. Can anyone help?
Measure 1:
Measure 2:
Solved! Go to Solution.
Hi @xiumi_hou ,
Yes,my measure is based on yours,have you tried it?
Your measure "SF_Before_A1" should be corrected to either of the following ones:
SF_Before_A1 = calculate([SF_case_inactive], 'Calls'[Count_Held_Sessions_A1]=0)
Or
SF_Before_A1 = If ('Calls'[Count_Held_Sessions_A1]=0,[SF_case_inactive],blank())
I just advise you not to use "filter" funtion in this situation.
And measure 1 and measure 2 remain the same.
Pls try it and advise me if there's any error returned.
Best Regards,
Kelly
Hi @xiumi_hou ,
Measure “SF_Before_A1” should be corrected as below:
SF_Before_A1 = calculate([SF_case_inactive], [Count_Held_Sessions_A1]=0)
Or
SF_Before_A1 = If ([Count_Held_Sessions_A1]=0,[SF_case_inactive],blank())
As you’re calculating a result based on measure 1,and measure 1 is based on table “Cases”, if you wanna use filter function, it should be within table “Cases”.
If it doesn’t work, pls show me your sample data.
Hope this would help.
Best Regards,
Kelly
When you filter Measure1 using Measure2 you need to data grouping at some level to filter
Like
Sumx(filter(values(table[id],measure2 >0),measure1)
Sumx(filter(summarize(table[id],"M1",sum(measure2),"M2",sum(measure1)),[M2]>0),[M1])
Can you help me revise mine? Thank you so much
Hi @xiumi_hou ,
Yes,my measure is based on yours,have you tried it?
Your measure "SF_Before_A1" should be corrected to either of the following ones:
SF_Before_A1 = calculate([SF_case_inactive], 'Calls'[Count_Held_Sessions_A1]=0)
Or
SF_Before_A1 = If ('Calls'[Count_Held_Sessions_A1]=0,[SF_case_inactive],blank())
I just advise you not to use "filter" funtion in this situation.
And measure 1 and measure 2 remain the same.
Pls try it and advise me if there's any error returned.
Best Regards,
Kelly
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
58 | |
36 | |
32 |
User | Count |
---|---|
90 | |
62 | |
61 | |
49 | |
45 |