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.
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>)
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 |
---|---|
61 | |
56 | |
55 | |
36 | |
34 |
User | Count |
---|---|
77 | |
73 | |
45 | |
45 | |
43 |