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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
scarrion
New Member

last date data/maximum value/Switch

Hi all,

 

We want to visualize the data in a graph that shows the record of the last date of a parameter (NDVI). We also want to show in a table this value, the maximum value of the parameter and the category (this parameter, according to its value has different levels (Soil, Low Level, Low-Medium Level, Medium Level, Medium-High Level, High Level) so we have made a SWITCH (where NDVI_LD is NDVI last date):

 

Evaluación NDVI =

SWITCH(true(), 'sat_tech'[NDVI_LD]<0.2, "0.Suelo", 'sat_tech'[NDVI_LD]<0.3, "1.Nivel Bajo", 'sat_tech'[NDVI_LD]<0.45, "2.Nivel Medio-Bajo",'sat_tech'[NDVI_LD]<0.55, "3.Nivel Medio", 'sat_tech'[NDVI_LD]<0.65, "4.Nivel Medio-Alto",'sat_tech'[NDVI_LD]<1, "5.Nivel Alto", "Fuera de Rango")

 

In addition, to force the last date to be displayed, the isLastDate_extID variable has been created, where the last date data is set to true. When we filter by true, the chart shows the correct data but the table does not. As you can see in the following screenshot, the values of 'NDVI last date' and the MAX_NDVI show the same value:

scarrion_0-1654017636098.png

When we avoid this filter (isLastDate_exId) Máx NDVI values are ok and 'NDVI última fecha' (NDVI last date) too, but NDVI ultima fecha and Evaluación (level) are not correlated. As you can see at the following screenshot, the NDVI ultima fecha (NDVI last date) is 0.77 but it shows 0.Suelo. Acording to the SWITCH we mentioned before, in this case it should be '5. Nivel alto'.

scarrion_1-1654017677902.png

 

Can you help us? Thanks in advance!!!

1 REPLY 1
Anonymous
Not applicable

Hi @scarrion ,

 

I think this should be caused by your data model. Could you share a sample file with us and show us the result you want? This will make us easier to find the solution.

 

Best Regards,
Rico Zhou

 

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 Power BI Update Carousel

Power BI Monthly Update - April 2026

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

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.