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
Budfudder
Helper IV
Helper IV

Ignore a Slicer?

I have a simple table visual showing a list of transactions, each row of which has a date and a value (a dollar amount). I have a slicer which allows the user to select a date, and the table correctly shows only the transactions for that date.

 

I now have a requirement to show the Year To Date figures - so whatever date the user chooses in the slicer, he'll see a separate display of the total of the transactions this year up to and including the chosen date.

 

How can I calculate the total of the transactions up to and including the selected date? I created a simple calculation:

 

 

This Year NB To Date = sumx(filter(Tx,
                                   Tx[Created On] <= [Date Selected] && Tx[Created On] >= DATE(2018,1,1)),
                            Tx[Value])

Note that the "[Date Selected]" item is just a variable holding the date selected in the slicer.

 

But the slicer stops that calculation from seeing all the dates - it just gives the total for the date selected in the slicer, not for the whole year up to and including that point.

1 REPLY 1
v-cherch-msft
Employee
Employee

Hi @Budfudder

 

You may create a calendar table and use it as slicer. Make sure there is no relationship between it and Tx table as below. Then you may get the value with your measure as requested.

Date Selected = SELECTEDVALUE('Calendar'[Date])

1.png

 

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.