Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RichOB
Post Patron
Post Patron

Measure to obtain values in a column

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?

 

MonthFire Service Called 
AprilYes
AprilNo
April Yes
AprilNo
MayNo
MayYes
MayYes
MayNo
JuneNo
JuneYes
JuneYes
June Yes
1 ACCEPTED SOLUTION
Anonymous
Not applicable

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:

vzhengdxumsft_0-1719198413087.png

 

 

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.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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:

vzhengdxumsft_0-1719198413087.png

 

 

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.

Anonymous
Not applicable

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>)

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.