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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
powerbiwork
Helper I
Helper I

Dynamic Formula from Multiple Slicer

 Hi, 

 

I have the CPI in the same table, which have the year, month and CPI.

powerbiwork_0-1631036126323.png

 

I am trying to create a calculator to calculate the difference of the CPI if different dates(start year, start month, end year, end month) are selected. 

powerbiwork_1-1631036172276.png

I was able to pull the CPI value because I edited the interaction. But if I want to create a measure to subtract 273-259.10 based on the date slicers, would it be possible? 

 

Thanks so much in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @powerbiwork 

It is impossible for you to create a measure to subtract 273-259.10 based on the date slicers .When you create a measure based on date slicers , the system cannot judge which slicer can be used ,because the fields for slicers all come from a field in your data table .

Interaction just a visual effect , it doesn’t work in measure or calculated column .If you want to calculate the diff you must use separate data table and the date slicers that with different fields .

I create a sample with separate data table .

(1) Copy out a single data table .

Table 2 = DISTINCT('Table')

(2) Create different date slicers for different tables .

(3)Create a measure to calculate the diff between the value from different slicers .

diff = SELECTEDVALUE('Table 2'[Value])-SELECTEDVALUE('Table'[Value])

The result is as shown :

Ailsamsft_0-1631240304817.png

I have attached my pbix file ,you can refer to the page 2 in my pbix file .

 

Best Regards

Community Support Team _ Ailsa Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @powerbiwork 

It is impossible for you to create a measure to subtract 273-259.10 based on the date slicers .When you create a measure based on date slicers , the system cannot judge which slicer can be used ,because the fields for slicers all come from a field in your data table .

Interaction just a visual effect , it doesn’t work in measure or calculated column .If you want to calculate the diff you must use separate data table and the date slicers that with different fields .

I create a sample with separate data table .

(1) Copy out a single data table .

Table 2 = DISTINCT('Table')

(2) Create different date slicers for different tables .

(3)Create a measure to calculate the diff between the value from different slicers .

diff = SELECTEDVALUE('Table 2'[Value])-SELECTEDVALUE('Table'[Value])

The result is as shown :

Ailsamsft_0-1631240304817.png

I have attached my pbix file ,you can refer to the page 2 in my pbix file .

 

Best Regards

Community Support Team _ Ailsa Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Solution Authors