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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
DavidB023
Helper III
Helper III

Gruyere Column

Hi everybody !

I have these kind of table :hg.PNG

 

 

 

 

 

 

And I don't understand why when I enter this measure :  

f.PNG

 

 

I have the value of mai 2017 like that : 

zd.PNG

 My goal is to have the last value but not at the last date because its empty..
Thanks

Best regards

David

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You should actually be able to strip this down further:

DRC F =
    VAR MaxDate =
        CALCULATE ( MAX ( 'PVCE'[Date] ); 'PVCE'[DRC] <> BLANK () )
    RETURN
            CALCULATE ( SUM ( 'PVCE'[DRC] ); 'PVCE'[Date] = MaxDate )
        

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi David,

 

you're getting the may figure as it is the highest non blank figure, try the expression below and see if it does what you need (may not be the most elegant!):

DRC F =
    VAR MaxDate =
        CALCULATE ( MAX ( 'PVCE'[Date] ); 'PVCE'[DRC] <> BLANK () )
    RETURN
        IF (
            DISTINCTCOUNT ( 'PVCE'[Date] ) = 1;
            SUM ( 'PVCE'[DRC] );
            CALCULATE ( SUM ( 'PVCE'[DRC] ); 'PVCE'[Date] = MaxDate )
        )
Anonymous
Not applicable

You should actually be able to strip this down further:

DRC F =
    VAR MaxDate =
        CALCULATE ( MAX ( 'PVCE'[Date] ); 'PVCE'[DRC] <> BLANK () )
    RETURN
            CALCULATE ( SUM ( 'PVCE'[DRC] ); 'PVCE'[Date] = MaxDate )
        

@Anonymous Perfect ! Thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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