The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Good day,
I have two tables, related to each other by fist column (name of the source file). I'm looking for measure to show me how many "RISK and HIGH RISK" checks were done comparing to "none or standard". Result should be in procents and filtered by year (2021)
SOURSE FILE NAME | REASON FOR CHECK | SOURSE FILE NAME | Date of Check | ||
1 | none | 1 | 2020 | ||
2 | risk | 2 | 2020 | ||
3 | high risk | 3 | 2021 | ||
4 | none | 4 | 2021 | ||
5 | standard | 5 | 2021 | ||
6 | risk | 6 | 2021 |
For example in 2021 there were 4 checks where two of these were (Risk/High Risk) - final result is 50% in 2021.
Thnaks
Aleks
Try these measures:
Check Count = COUNT ( CheckReason[SOURSE FILE NAME] )
Check Percent =
VAR vNumerator =
CALCULATE (
[Check Count],
CheckReason[REASON FOR CHECK] IN { "risk", "high risk" }
)
VAR vDenominator = [Check Count]
VAR vResult =
DIVIDE ( vNumerator, vDenominator )
RETURN
vResult
Proud to be a Super User!
User | Count |
---|---|
24 | |
9 | |
8 | |
7 | |
6 |
User | Count |
---|---|
29 | |
13 | |
11 | |
9 | |
9 |