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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
treeclauses
Frequent Visitor

Display the lastdate -1 when lastdate is blank

Hi,

I need to display the value "Unidades Acumulado" of the lastdate, but in some fills the lastdate is blank, so in this case, I need to show the value of the last date than is not blank.

 

In this case, the last date is "Agosto" but is blank, so I need to show the month of "Julio" (In a measure of corse, to put it in a visual object)

2020-09-29 16_42_43-EIAX-DEV PIP v1 - eiax-dev.eastus2.cloudapp.azure.com_3389 - Conexión a Escritor.png

 

I'm using this measure to bring the value of the lastdate:

 

ultimo mes unidades acumulado = VAR endDate = LASTDATE('Informe Comercial 1'[Fecha])
return
CALCULATE(SUM('Informe Comercial 1'[Unidades Acumulado]), FILTER('Informe Comercial 1', 'Informe Comercial 1'[Fecha] = endDate
))

 

Thank you so much, Regards!

 

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@treeclauses 

Try use MAX instead of Lastdate and add another not equal to blank filter in the formula: 

 

ultimo mes unidades acumulado =
VAR endDate = MAX('Informe Comercial 1'[Fecha])
return
CALCULATE(SUM('Informe Comercial 1'[Unidades Acumulado]), FILTER('Informe Comercial 1', 'Informe Comercial 1'[Fecha] = endDate && [Unidades Acumulado] <> Blank()
))


Paul Zheng _ Community Support Team
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

1 REPLY 1
V-pazhen-msft
Community Support
Community Support

@treeclauses 

Try use MAX instead of Lastdate and add another not equal to blank filter in the formula: 

 

ultimo mes unidades acumulado =
VAR endDate = MAX('Informe Comercial 1'[Fecha])
return
CALCULATE(SUM('Informe Comercial 1'[Unidades Acumulado]), FILTER('Informe Comercial 1', 'Informe Comercial 1'[Fecha] = endDate && [Unidades Acumulado] <> Blank()
))


Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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