Forum Discussion
Anonymous
5 years agoNot applicable
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 ...
- 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 🙂
Fowmy
Super User
5 years agoAnonymous
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 🙂
Anonymous
5 years agoNot applicable
Thank you for your help!