Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

DAX Help

Hello!   If either vehicle_id or Date is filtered my visuals should show a calculation of max-min but if neither of them are filtered it should show BLANK. With this code i'm getting an error "Too ...
  • Fowmy's avatar
    5 years ago

    Anonymous 

    Can you try this version?

    VAR minimi = MIN(YhdistettyTaulu[fuelconsumption_value])
    VAR maksimi = MAX(YhdistettyTaulu[fuelconsumption_value])
    return
    IF(
        ISFILTERED('YhdistettyTaulu'[vehicle_id]) || ISFILTERED('YhdistettyTaulu'[Date]);
        maksimi - minimi ; 
        BLANK()
    )

     

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn