Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi, what measure would show in a card that there have been 7 instances where the fire service was called in the last 3 months, please?
Month | Fire Service Called |
April | Yes |
April | No |
April | Yes |
April | No |
May | No |
May | Yes |
May | Yes |
May | No |
June | No |
June | Yes |
June | Yes |
June | Yes |
Solved! Go to Solution.
Hi @RichOB
Please try this:
Here I create a measure:
MEASURE =
VAR _currentMonth =
MONTH ( TODAY () )
RETURN
COUNTROWS (
FILTER (
ALLSELECTED ( 'Table' ),
MONTH ( 'Table'[Month] ) >= _currentMonth - 2
&& [Fire Service Called ] = "Yes"
)
)
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @RichOB
Please try this:
Here I create a measure:
MEASURE =
VAR _currentMonth =
MONTH ( TODAY () )
RETURN
COUNTROWS (
FILTER (
ALLSELECTED ( 'Table' ),
MONTH ( 'Table'[Month] ) >= _currentMonth - 2
&& [Fire Service Called ] = "Yes"
)
)
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Edit the query in Power Query (Transform Data). Add a column to query that converts the Yes to 1 and No to 0. Save query and return to Power BI Desktop.
Add a measure that sums the new column - Service Called Count = SUM(<new column>)