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
Anonymous
Not applicable

Need to correct value measure in Card Visual

I have a measure where we calculating count of one of the column from one of the fact table:

Lines Cancelled =
VAR selectedDate =
CALCULATE (
MAX ( calendar[calendar_date] ),
ALLSELECTED ( calendar[calendar_date] )
)
VAR result =
CALCULATE (
COUNT ( order_fact[order_id] ),
FILTER (
ALL ( 'calendar' ),
CALCULATE (
MIN ( order_fact[status_change_date] ) >= selectedDate
)
)
)
RETURN
IF ( ISBLANK ( result ), 0, result )

When I pull this measure in table with other dimension column and filtering this measure at visual level such that this measure is not 0, then we are getting correct count. But same when we are adding in card visual we are not getting correct value.

as we are not able to add dimension fields  in card visual and also we cannot filter the measure value to non zero.

Is there any way to get correct result by modifying the existing measure

Thanks,
Mohit Gupta




1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try like

 

VAR result =
CALCULATE (
COUNT ( order_fact[order_id] ),
FILTER (
ALL ( 'calendar' ),
 (
( calendar[Date] ) >= selectedDate
)
)
)

 

 

or

 

 

VAR result =
CALCULATE (
COUNT ( order_fact[order_id] ),
FILTER (
( 'order_fact' ),

MIN ( order_fact[status_change_date] ) >= selectedDate

)
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors