Forum Discussion
Show value filtered by a column
- 4 years ago
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 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.
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 | Value | Master |
| x | National | 2 | M1 |
| y | National | 3 | M1 |
| x | Region 1 | 1 | M2 |
| x | Region 2 | 1 | M3 |
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 ?
| M1 | M2 | |
| National | Region 1 | |
| x | 2 | 1 |
Thank you for your help!