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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
ASheller1023
Regular Visitor

Measure works in Matrix but is showing blank for card visual.

Hello,

 

I have a time intelligence dax expression that I used from Dax Patterns to show previous average cost of quarter to date.  It shows the correct answer in the matrix visual, but shows blank in the card visual.  There are not any filters affecting the visuals.  I have tried proofing my DAX expression and I find that it operates correctly based off the Matrix visual.  I am not sure what else to try to resolve this issue.  Here is a screenshot of the visuals:

ASheller1023_0-1706128678190.png

If needed, here is the DAX expression:

ASheller1023_1-1706128741204.pngASheller1023_2-1706128765400.png

 

Any direction is appreciated because I have exhausted any options that I know.  

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @ASheller1023 ,
According to your description, the reason why card is shown as blank may be because measure relies on the context provided by matrix for its calculation, while card visual does not provide a similar context. Card visuals do not maintain row context.

Time intelligence functions often depend on a date context which may be present in a Matrix but not in a Card. Make sure your DAX measure does not require a specific date context to calculate the value.

Best regards

Albert He

 

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

I believe @Anonymous is correct. You can either add a visual filter to the card in order to provide date context or anywhere the measure references MAX('Date'[Column]) you can check if the column is filtered and, if it's not, you can use something like this to return the column value where the date equals today.

 

    VAR LastFiscalYearAvailable =
        IF(
            HASONEVALUE('CALENDAR'[Fiscal Year]),
            MAX('CALENDAR'[Fiscal Year]),
            CALCULATE(
                MAX('CALENDAR'[Fiscal Year]),
                'CALENDAR'[Date] = TODAY()
            )
        )

View solution in original post

4 REPLIES 4
ASheller1023
Regular Visitor

Thank you for the answer @birknerj !  I appreciate the help as always!  I hope everything is well!  🙂 

Anonymous
Not applicable

Hi @ASheller1023 ,
According to your description, the reason why card is shown as blank may be because measure relies on the context provided by matrix for its calculation, while card visual does not provide a similar context. Card visuals do not maintain row context.

Time intelligence functions often depend on a date context which may be present in a Matrix but not in a Card. Make sure your DAX measure does not require a specific date context to calculate the value.

Best regards

Albert He

 

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

 

ASheller1023
Regular Visitor

@birknerjdo you have any ideas, the infamous DAX wizard

I believe @Anonymous is correct. You can either add a visual filter to the card in order to provide date context or anywhere the measure references MAX('Date'[Column]) you can check if the column is filtered and, if it's not, you can use something like this to return the column value where the date equals today.

 

    VAR LastFiscalYearAvailable =
        IF(
            HASONEVALUE('CALENDAR'[Fiscal Year]),
            MAX('CALENDAR'[Fiscal Year]),
            CALCULATE(
                MAX('CALENDAR'[Fiscal Year]),
                'CALENDAR'[Date] = TODAY()
            )
        )

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.