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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not 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 many arguments were passed to the ISFILTERED function".
 
VAR minimi = MIN(YhdistettyTaulu[fuelconsumption_value])
VAR maksimi = MAX(YhdistettyTaulu[fuelconsumption_value])
return
IF(ISFILTERED('YhdistettyTaulu'[vehicle_id]) || (ISFILTERED(('YhdistettyTaulu'[Date]) ; maksimi - minimi ; BLANK())))
1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@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

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@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

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Thank you for your help!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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