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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live 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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.