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,
I am trying to create individual cards for each business region and show how many of the servers have been patched
Host | Region | Patched |
A11 | AMERICAS | Yes |
A45 | AMERICAS | No |
E55 | EMEA | Yes |
E34 | EMEA | Yes |
E44 | EMEA | No |
E67 | EMEA | Yes |
Card should show "50% of all AMERICAS hosts patched"
Solved! Go to Solution.
Hi,
Demo file attached.
This is example of calculated column using dax:
Result:
Counter =
VAR _totalRows =
CALCULATE (
COUNTROWS ( RegionTable ),
FILTER ( RegionTable, RegionTable[Region] = EARLIER ( RegionTable[Region] ) )
)
VAR _totalPatchedRows =
CALCULATE (
COUNTROWS ( RegionTable ),
FILTER ( RegionTable, RegionTable[Region] = EARLIER ( RegionTable[Region] ) ),
FILTER ( RegionTable, RegionTable[Patched] = "Yes" )
)
RETURN
FORMAT ( DIVIDE ( _totalPatchedRows, _totalRows ), "0%" ) & " of all " & RegionTable[Region] & " hosts patched"
Regards,
Nemanja Andic
Hi,
Demo file attached.
This is example of calculated column using dax:
Result:
Counter =
VAR _totalRows =
CALCULATE (
COUNTROWS ( RegionTable ),
FILTER ( RegionTable, RegionTable[Region] = EARLIER ( RegionTable[Region] ) )
)
VAR _totalPatchedRows =
CALCULATE (
COUNTROWS ( RegionTable ),
FILTER ( RegionTable, RegionTable[Region] = EARLIER ( RegionTable[Region] ) ),
FILTER ( RegionTable, RegionTable[Patched] = "Yes" )
)
RETURN
FORMAT ( DIVIDE ( _totalPatchedRows, _totalRows ), "0%" ) & " of all " & RegionTable[Region] & " hosts patched"
Regards,
Nemanja Andic
Thank you Nemanja! This is exactly what I was looking for!
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 |
---|---|
110 | |
97 | |
78 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |