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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Sai_Alkesh
Helper II
Helper II

Create 2 Measures from 2 different slicers

Hi

I have a table - total data. 

In the table, i have column with date time, called as Calendar Year/Month, which i will use for user selection.

I have created 2 different slicers for the same dimension with the option of single select, as i want the user to select Month 1 in Slicer 1 and another month (Month 2) in slicer 2

Based on the above selection by the user, i want to have 2 different measures, which reference the different slicers selection, so that i can proceed to perform other calculations.

Measure 1 will filter data based on the selections done in Slicer 1 and Measure 2 based on selections in Slicer 2.

Can someone please guide me on how to do this in Power BI

image.png

 

1 ACCEPTED SOLUTION

@Sai_Alkesh can you check wht selected value you get in 2nd measure. It should logically work, without looking at pbix it is very hard to tell what is going on. Do you have any fitler , may be update measure to ALLSELECTED instead of ALL



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

10 REPLIES 10
parry2k
Super User
Super User

@Sai_Alkesh you have to have two seperate dimension table to achieve this and then you can use respective dimension in your mesure.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k do i need to create another table with the column of Calendar Year/Month and reference that in slicer 2 ?

 

Sorry, but am not clear on the solution offered

 

Thanks for the help.

@Sai_Alkesh that's exactly correct, create another table and use that in slicer2.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@Sai_Alkesh what is your measure? Can you share?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

this is measure 1 based on the selection of value in slicer 1

M1ABS = VAR selection = SELECTEDVALUE('total data'[Calendar Year/Month],0000) return sum('total data'[Abs Error Value Final])
 
Total data is table name
Abs Error Value Final is the column name.
 
so for example, if the user selects Jan 19 from slicer 1, then i fetch the total sum of Abs Error value. Likewise i now need to get the data for user selection in Slicer 2 (if the user selects Feb 19 in slicer 2). 
 
How do i create another measure, wherein the selectedvalue should be selections from slicer 2
 
Sorry for the jumbled explanation, but am a newbie on Power BI and exploring most of the commands in here to build my report.

@Sai_Alkesh here is what you can do, i assumed table name /column name in following, you can change as per your model.

 

M2ABS = 
VAR selection = SELECTEDVALUE('2nd Table'[Calendar Year/Month],0000) 
return 
CALCUATE( 
sum('total data'[Abs Error Value Final]),
ALL( 'total data' ),
'total data'[Calendar Year/Month] = selection
)

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

the formula works, however i get wrong values:

the Abs final values for 

Jan 19 are 7.03M

Feb 19 are 7.88M

 

When i select Jan 19 in slicer 1, i get the correct value of 7.03M

 

However, when i select Feb 19 in Slicer 2, the measure returns to me value of 179.37M..... this should just be 7.88M

@Sai_Alkesh can you check wht selected value you get in 2nd measure. It should logically work, without looking at pbix it is very hard to tell what is going on. Do you have any fitler , may be update measure to ALLSELECTED instead of ALL



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k 

Thanks, Yes i do have other filters wherein am filtering by Geography (Region, Country, Market etc.,)


I changed ALL to ALLSELECTED and the 2nd measure works fine. However the first slicer selections are gone when i select the 2nd slicer....

I'll try to send you the link for the pbix download...maybe am doing something silly in here...

 

Thanks for all your help !

@parry2k i created another table M2 with no relationship to the total data table (table1)

 

How do i create a measure 2, that would require calculations to be performed in the columns in table1, based on the selections done in the slicer 2 of table 2 (M2) ?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors