Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
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 , @SJAV
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 , @SJAV
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 @SJAV,
Can you please try:
NewMeasure = IF(MAX('YourTable'[Value]) = 1, 1, 0)
User | Count |
---|---|
52 | |
46 | |
20 | |
16 | |
13 |
User | Count |
---|---|
108 | |
56 | |
31 | |
19 | |
18 |