Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Based on this data I want to create a calculated column or measure.
If compliance_status is both installed and required result should be Non compliant otherwise compliant in a new column.
I have no idea how to achieve it tried multiple ways but no luck.
Any suggestion how to achieve it.
You can use the DAX language to create a computed column or metric to implement your requirements. Here is a sample DAX formula:
Compliance Status = IF(Table1[Compliance_Status] = "Installed" && Table1[Compliance_Status] = "Required", "Non compliant", "Compliant")
This formula checks whether the value in the Compliance_Status column contains both "Installed" and "Required". If so, the result is "Non compliant", otherwise it is "Compliant". You can apply this formula to a new computed column or measure to display the results in a table.
Hi @Anonymous,
You can try to use the following measure formula to get the correspond statues count based on current hostname:
formula =
VAR currName =
SELECTEDVALUE ( Table[HostName] )
VAR summary =
SUMMARIZE (
FILTER (
ALLSELECTED ( Table ),
[compliance_status] IN { "Installed", "Required" }
),
[HostName],
[compliance_status]
)
RETURN
IF (
COUNTROWS ( FILTER ( summary, [HostName] = currName ) ) < 2,
"Compliant",
"Non compliant"
)
Regards,
Xiaoxin Sheng
Unfortunately it didn't worked as expected.
However I tried another method and it worked.
I have created a duplicate table and then used group by to achieve the solution.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
11 |