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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors