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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
J0676s
Frequent Visitor

Sum the values of a particular column based on multiple slicer selection

Hi - I am trying to figure out how to calculate PQ column for it to give the sum of all selected quarters in the slicer. Right now it's giving values only for 1 quarter as I have used SELECTEDVALUE. I have tried using functions such as countx, ALLSELECTED, SUM but nothing seems to work

J0676s_0-1709750938888.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @J0676s ,

Based on your problems, I found a similar post to this one of yours on the forum, I think it addresses your question.

When you apply this metric you can get the results you need in Orders PQ # and PQ SUM when choosing a different slicer. Here is the Measure DAX code.

Orders PQ # = CALCULATE([PQ SUM],DATEADD('Calendar'[Date],-1,QUARTER))

vyilongmsft_2-1710230957001.png

 

 

 

Best Regards

Yilong Zhou

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

2 REPLIES 2
Anonymous
Not applicable

Hi @J0676s ,

Based on your problems, I found a similar post to this one of yours on the forum, I think it addresses your question.

When you apply this metric you can get the results you need in Orders PQ # and PQ SUM when choosing a different slicer. Here is the Measure DAX code.

Orders PQ # = CALCULATE([PQ SUM],DATEADD('Calendar'[Date],-1,QUARTER))

vyilongmsft_2-1710230957001.png

 

 

 

Best Regards

Yilong Zhou

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

lbendlin
Super User
Super User

Read about VALUES(), SUMMARIZE, SUMMARIZECOLUMNS and ADDCOLUMNS.  You need to collect all the selected values (not assuming it's only one) and then calculate your measure for each of them.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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