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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Month Cards

Hello everyone. I have some monthly cards I made for to quickly see current situation for a use case. They work untill I use a slicer till I use date slicers/filters which is logical. So I want them to ignore any filters I use on my visuals I guess to work with FILTER() and ALL() but I can't figure it out. I have following cards:

 

MonthVariance = 

([Billable MTD]-[Billable LMTD])/[Billable LMTD]
Year Variance = 
([Billable MTD]-[Billable LY MTD])/[Billable LY MTD]
Billable Last Month = 
CALCULATE([Billable],DATESMTD(dateadd(fact_harvest_time[date_id],-1,,MONTH)))
Billable Current Month = 
CALCULATE([Billable],DATESMTD(dateadd(fact_harvest_time[date_id],-1,,MONTH)))
Billable CM Last Year = 
CALCULATE([Billable],DATESMTD(ENDOFMONTH(dateadd(fact_harvest_time[date_id],-12,,MONTH))))
 Billable = SUM([Billable Amount])
 
Working.PNGNot working.PNG
 
Anyone know how to re-write the DAX formules in order to make them ignore filters/slicers on my visual?
 
Thanks!

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

You can switch off interactions

And have visual level filter on date.

Interactions.png

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

You can switch off interactions

And have visual level filter on date.

Interactions.png

Anonymous
Not applicable

Cool, this worked! But it should also be doable with DAX-code right?

AilleryO
Memorable Member
Memorable Member

Hi,

 

To remove all filters from a table you can add in your formula :

ALL(fact_harvest_time)

ALL functions accept a table or a specific column from a table as argument, so to remove from all columns just use the table name as argument in your all function.

so It will make something like :

=CALCULATE([yourmeasure],ALL(fact_harvest_time);...rest of calculation)

 Let us know if it works,

Anonymous
Not applicable

Hey @AilleryO I tried this but didn't seem to work:

 

Billable CM Last Year= CALCULATE([Billable],All(fact_harvest_time),DATESMTD(ENDOFMONTH(dateadd(fact_harvest_time[date_id],-12,,MONTH))))
 
I also tried this but this gave an error (a table of multiple values was supplied where a single value was expected)
Billable LY MTD = CALCULATE([Billable],FILTER(All(fact_harvest_time),DATESMTD(ENDOFMONTH(dateadd(fact_harvest_time[date_id],-12,,MONTH)))))

Hi @Anonymous ,

 

Is your slicer based on this table : fact_harvest_time ?

Anonymous
Not applicable

Yep!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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