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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Can't show output measure

I create new measure but It's don't show data as below

Untitled.png

My measure :

 

count = VAR __CurrentMeasure =
CALCULATE (
COUNT ( 'Before'[Date]),
FILTER ('Before',
( YEAR(DATEVALUE('Before'[Date])) = 2021 && MONTH(DATEVALUE('Before'[Date])) = 1 && 'Before'[Status(2021)]) = "live"
)
)
RETURN
IF ( ISBLANK ( __CurrentMeasure ), 0, __CurrentMeasure )
 
Please guide me about it.
1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

v-lionel-msft_0-1612511609100.png

This error occurs because the data types around the "=" are different and cannot be compared. For example, in my example, the left side of the equal sign is the date type, and the right side of the equal sign is the text type.

 

v-lionel-msft_1-1612512008316.png

 

Try to force the data type of the'Before'[Date] column to be changed to a date type and use the following formula.

v-lionel-msft_2-1612512057908.png

count = 
VAR __CurrentMeasure =
CALCULATE (
    COUNT ( 'Before'[Date]),
    FILTER (
        'Before',
        YEAR('Before'[Date]) = 2021 && MONTH('Before'[Date]) = 1 && 'Before'[Status(2021)] = "live"
    )
)
RETURN
IF ( 
    ISBLANK ( __CurrentMeasure ),
     0, __CurrentMeasure 
)

 

Best regards,
Lionel Chen

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

5 REPLIES 5
v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

v-lionel-msft_0-1612511609100.png

This error occurs because the data types around the "=" are different and cannot be compared. For example, in my example, the left side of the equal sign is the date type, and the right side of the equal sign is the text type.

 

v-lionel-msft_1-1612512008316.png

 

Try to force the data type of the'Before'[Date] column to be changed to a date type and use the following formula.

v-lionel-msft_2-1612512057908.png

count = 
VAR __CurrentMeasure =
CALCULATE (
    COUNT ( 'Before'[Date]),
    FILTER (
        'Before',
        YEAR('Before'[Date]) = 2021 && MONTH('Before'[Date]) = 1 && 'Before'[Status(2021)] = "live"
    )
)
RETURN
IF ( 
    ISBLANK ( __CurrentMeasure ),
     0, __CurrentMeasure 
)

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

themistoklis
Community Champion
Community Champion

@Anonymous 

 

I think one of your closing parenthesis (right before = "live") is in the wrong place. Try the following:

 

count = VAR __CurrentMeasure =
CALCULATE (
COUNT ( 'Before'[Date]),
FILTER ('Before',
( YEAR(DATEVALUE('Before'[Date])) = 2021 && MONTH(DATEVALUE('Before'[Date])) = 1 && 'Before'[Status(2021)] = "live")
)
)
RETURN
IF ( ISBLANK ( __CurrentMeasure ), 0, __CurrentMeasure )

 

amitchandak
Super User
Super User

@Anonymous , Is data type is date not need use datevalue

 

Try like

count = VAR __CurrentMeasure =
CALCULATE (
COUNT ( 'Before'[Date]),
FILTER ('Before',
YEAR('Before'[Date]) = 2021 && MONTH('Before'[Date]) = 1 && 'Before'[Status(2021)] = "live"
)
)
RETURN
IF ( ISBLANK ( __CurrentMeasure ), 0, __CurrentMeasure )

 

 

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

@themistoklis  @amitchandak 

error as below.

adamasmay_0-1612357898836.png

 

Help me please.

 

@Anonymous 

 

Can you send a snapshot of the formula with the error as well?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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