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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Show value filtered by a column

Hello,

 

I have a table  with 3 columns, The value of "National" Group is the sum of value of Region 1 and Region 2.

Object      Group  Value
x  National   2
y  National   3
x  Region 1   1
x  Region 2   1


I create a matrix and i have this:

 

 National  Region 1
x2     1
y3 

 

I want to filter dynamically the table and show only object of Region 1 without Blank cell and have this:

 National  Region 1
x2     1

I try to create a measure by filtering the column Group  with : Calculate( Sum(Value), Group="Region 1") but it's not working and i don't have anymore the column National in the matrix. Do you have any idea for resolving this problem please ?

Thank you

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous you cannot do that, if you are trying to do in a one measure then you have to change it:

 

testmeasure =

var y =CALCULATE(SUM('Table'[Value]),'Table'[Group]="Region1")
return SUM('Table'[Value])*DIVIDE(y,y))

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



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

7 REPLIES 7
Anonymous
Not applicable

Hello,

 

@parry2k 
Firstly, thank you for your help for my problem i already accept your proposition as the solution but i have another question , if i want to add another column in the matrix the filter in the measure doesn't work anymore

Now I have a table  with 4 columns, The value of "National" Group is the sum of value of Region 1 and Region 2.

Object      Group  ValueMaster
x  National   2M1
y  National   3M1
x  Region 1   1M2
x  Region 2   1M3

Solution:

testmeasure =

var y =CALCULATE(SUM('Table'[Value]),'Table'[Group]="Region1")
return SUM('Table'[Value])*DIVIDE(y,y))


How can i modify the dax code for having this ?

 

 M1M2
 National  Region 1
x2     1


Thank you for your help!

 

 
 
parry2k
Super User
Super User

@Anonymous you cannot do that, if you are trying to do in a one measure then you have to change it:

 

testmeasure =

var y =CALCULATE(SUM('Table'[Value]),'Table'[Group]="Region1")
return SUM('Table'[Value])*DIVIDE(y,y))

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



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.

Anonymous
Not applicable

Thank you it's working

parry2k
Super User
Super User

@Anonymous try these measures:

 

Sum Base = SUM ( Table[Value] )

Sum Region 1 = CALCULATE ( [Sum Base], Table[Region] = "Region 1" )

Sum when Region 1 is not blank =
VAR __region1 = [Region 1]
RETURN
[Sum Base] * DIVIDE ( __region1, __region1 )

 

Use sum when region 1 is not blank measure in your visual.

 

 

Follow us on LinkedIn and YouTube.gif to our YouTube channel

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



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.

Anonymous
Not applicable

I try it :

testmeasure =
var x= SUM('Table'[Value])
var y =CALCULATE(x,'Table'[Group]="Region1")
return IF(y=BLANK(),BLANK(),x*DIVIDE(y,y))
 
What do you mean by [Region 1] and Table[Region ] ?, It's not working i have only 3 column Obejct, Group and Value
 
 
parry2k
Super User
Super User

@Anonymous is it a fixed requirement to show only where region 1 has value ?



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.

Anonymous
Not applicable

Yes it's fixed requierement

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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