Forum Discussion
COUNTIFS in Power BI
- 8 years ago
Hi Dan27,
Based on this sample data, is 3 the desired result? If so, please new a measure and add it to card visual.
Measure1 = CALCULATE(COUNTROWS(Table2),FILTER(Table2,Table2[G]<=Table2[H]))
For more advice, please illustrate your requirement with actual sample data and desired result rather than just the Excel functions.
Regards,
Yuliana Gu
:)
That was the example of CALCULATE.
Here is teh syntax for your Question:
Calculated_Column=IF(Table1[ColumnG] <= Table1[ColumnH] , Table1[ColumnAL], BLANK()
If you want count.
Cnt_Measure = COUNT(Table1[Calculated_Column])
Thanks
Raj
Hi Raj
Thanks again for your help but again this isn't getting me the desired output because it's not performinng the count part.
I'm wanting to return a count of occurrences within a range. So my Excel equivalent would be
=COUNTIFS(G:G,"<="&H:H,AL:AL,"")
In Power BI this function doesn't work. I'm unsure if I can nest a COUNT and IF formula but so far what I've tried hasn't worked.
Thanks
Dan