Forum Discussion
Create DAX formula for result
Hi,
I am trying to create an measure to return a result of approved / not approved based on column K, C & L returning completed for each region for the specific id.
My data set consists of multirows for each id in different regions and in if the columns for each I.D in column K, C & L is complete this will give a result of approved.
Could someone guide me on what Dax formula I should be using to achive this
| Title | Location | K | C | L | Result |
| 100089654 | London | Completed | Completed | Completed | Approved |
| 100089654 | Angola | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | Côte d'Ivoire | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | DRC | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | Ghana | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | Kenya | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | Mauritius | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | Mozambique | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | Namibia | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | Nigeria | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | South Africa | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | Tanzania | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | Uganda | Incomplete | Incomplete | Incomplete | Not Approved |
| 100089654 | Zambia | Incomplete | Incomplete | Incomplete | Not Approved |
| 531766404 | London | Completed | Completed | Completed | Approved |
| 531766404 | Dubai | Completed | Completed | Completed | Approved |
| 531766404 | Côte d'Ivoire | Completed | Completed | Completed | Approved |
| 531766404 | DRC | Completed | Completed | Completed | Approved |
| 531766404 | Ghana | Completed | Completed | Completed | Approved |
| 531766404 | Kenya | Completed | Completed | Completed | Approved |
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
It is for creating a new column.
Result CC = VAR _condition = Data[K] = "Completed" && Data[C] = "Completed" && Data[L] = "Completed" RETURN IF ( _condition, "Approved", "Not approved" )Hi,
Thank you for your message, and could you please check the below?
Or, please show how your desired outcome of the visualization looks like.
Fix Result measure: = VAR _condition = "Completed" IN VALUES ( Data[K] ) && NOT ( "Incomplete" IN VALUES ( Data[K] ) ) && "Completed" IN VALUES ( Data[C] ) && NOT ( "Incomplete" IN VALUES ( Data[C] ) ) && "Completed" IN VALUES ( Data[L] ) && NOT ( "Incomplete" IN VALUES ( Data[L] ) ) RETURN IF ( HASONEVALUE ( Data[Title] ), IF ( _condition, "Approved", "Not approved" ) )
4 Replies
- Jihwan_Kim
Super User
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
It is for creating a new column.
Result CC = VAR _condition = Data[K] = "Completed" && Data[C] = "Completed" && Data[L] = "Completed" RETURN IF ( _condition, "Approved", "Not approved" ) - AHS2019Frequent Visitor
Thank you for your help however I am trying to use the formala to filter on the title and provide a overall result to show approved if column k, c,l is complete for all rows which have the same title
- Jihwan_Kim
Super User
Hi,
Thank you for your message, and could you please check the below?
Or, please show how your desired outcome of the visualization looks like.
Fix Result measure: = VAR _condition = "Completed" IN VALUES ( Data[K] ) && NOT ( "Incomplete" IN VALUES ( Data[K] ) ) && "Completed" IN VALUES ( Data[C] ) && NOT ( "Incomplete" IN VALUES ( Data[C] ) ) && "Completed" IN VALUES ( Data[L] ) && NOT ( "Incomplete" IN VALUES ( Data[L] ) ) RETURN IF ( HASONEVALUE ( Data[Title] ), IF ( _condition, "Approved", "Not approved" ) )- AHS2019Frequent Visitor
Thank you that works, on the filter if there is no selection the card displays blank, how can I update the to display measure to read "client not selected" if no selection has been made