Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi!
I'm been dealing with an issue for a while that I am not able to solve. I have a matrix with 1 row, 1 column and 1 Value (the value is a measure) like below (image1). What I am trying to do is add an additional measure that basically checks if any value in the row has 1. If so, then I want to whole row to get the value 1 (see image 2). I've been looking into MAXX and SUMX but it is not working. Are there any other solution I can look into?
image1
USA | CAN | MEX | |
A | 1 | 0 | 1 |
B | 0 | 0 | 0 |
C | 0 | 1 | 1 |
image2
USA | CAN | MEX | |
A | 1 | 1 | 1 |
B | 0 | 0 | 0 |
C | 1 | 1 | 1 |
Solved! Go to Solution.
Hi , @Anonymous
Thanks for your sample data and detailed description.
Here are the steps you can refer to :
(1)This is my test data:
(2)I create a measure to simulate your situation:
(3)Then we can create the measure like this:
Measure 2 = var _t =ADDCOLUMNS( CROSSJOIN( VALUES('Table'[Row]) , ALLSELECTED('Table'[Column])) , "m" , [Measure])
return
IF(SUMX(_t,[m])>0,1,0)
Then we can put this measure on the visual and we can get the result as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @Anonymous
Thanks for your sample data and detailed description.
Here are the steps you can refer to :
(1)This is my test data:
(2)I create a measure to simulate your situation:
(3)Then we can create the measure like this:
Measure 2 = var _t =ADDCOLUMNS( CROSSJOIN( VALUES('Table'[Row]) , ALLSELECTED('Table'[Column])) , "m" , [Measure])
return
IF(SUMX(_t,[m])>0,1,0)
Then we can put this measure on the visual and we can get the result as follows:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you! This worked after a small modification 🙂
Measure 2 = var _t =ADDCOLUMNS( CROSSJOIN( ALLSELECTED('Table'[Row]) , ALLSELECTED('Table'[Column])) , "m" , [Measure])
return
IF(SUMX(_t,[m])>0,1,0)
Hello @Anonymous,
Can you please try:
NewMeasure = IF(MAX('YourTable'[Value]) = 1, 1, 0)
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |