Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys,
I have a simple table with three columns, see below.
I need to create a measure that generates as a result the consolidated STATUS by RegNumber as follows:
If the same RegNumber get at least one STATUS = PENDING, the end result should be PENDING for this REGNUMBER, otherwise STATUS = OK.
It´ll be show in a table visualization:
Thanks for all
Cheers
Solved! Go to Solution.
Hi @garcia,
You can use below measure to check the status, then use selectcolumns and distinct function to get the result table.
Sample:
Measure:
Check Status =
var currentNumber= LASTNONBLANK(Sheet2[RegNumber],Sheet2[RegNumber])
Return
if(CONTAINS(FILTER(ALL(Sheet2),Sheet2[RegNumber]=currentNumber),Sheet2[Status],"Pending"),"Pending","OK")
Table formula:
Table = DISTINCT(SELECTCOLUMNS(Sheet2,"RegNumber",[RegNumber],"Status",[Check Status]))
Result:
Regards,
Xiaoxin Sheng
Hi @garcia,
You can use below measure to check the status, then use selectcolumns and distinct function to get the result table.
Sample:
Measure:
Check Status =
var currentNumber= LASTNONBLANK(Sheet2[RegNumber],Sheet2[RegNumber])
Return
if(CONTAINS(FILTER(ALL(Sheet2),Sheet2[RegNumber]=currentNumber),Sheet2[Status],"Pending"),"Pending","OK")
Table formula:
Table = DISTINCT(SELECTCOLUMNS(Sheet2,"RegNumber",[RegNumber],"Status",[Check Status]))
Result:
Regards,
Xiaoxin Sheng
Just PERFECT this solution!!! Thanks!!!!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |