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.
Hi,
I have a table (RISK_EVALUATION) that contains risk evaluations for RISKIDs (can be multiple) along with dates and outcomes. I then created a measure that I intent to include in a matrix to count how many risks have the latest evaluation as "Not Assessed".
The matrix will have the last day of the month from a calendar table as columns. A RISKID should be counted on that month if the latest evaluation, even if done many months ago, had a value of "Not Assessed". It'd look like this:
Sep-23 | Oct-23 | Nov-23 | Dec-23 | |
# Risks Not Assessed | 5 | 5 | 4 | 4 |
My current measure:
Solved! Go to Solution.
I have figure it out. My error was on the variable tmp1 which was producing a table with the latest date for all RISKIDs, rather than the latest for each RISKID.
I've replaced that variable by the following:
var tmp1 =
SUMMARIZE(
FILTER(
FILTER(RISK_EVALUATION,RISK_EVALUATION[RE_DATE]<=_selectdate),
RISK_EVALUATION[RE_DATE]
= CALCULATE (
MAX ( RISK_EVALUATION[RE_DATE] ),
ALLEXCEPT ( RISK_EVALUATION, RISK_EVALUATION[RISKID] )
)
),[RISKID],[RE_DATE])
This actually eliminates the need for the variable tmp as well.
I have figure it out. My error was on the variable tmp1 which was producing a table with the latest date for all RISKIDs, rather than the latest for each RISKID.
I've replaced that variable by the following:
var tmp1 =
SUMMARIZE(
FILTER(
FILTER(RISK_EVALUATION,RISK_EVALUATION[RE_DATE]<=_selectdate),
RISK_EVALUATION[RE_DATE]
= CALCULATE (
MAX ( RISK_EVALUATION[RE_DATE] ),
ALLEXCEPT ( RISK_EVALUATION, RISK_EVALUATION[RISKID] )
)
),[RISKID],[RE_DATE])
This actually eliminates the need for the variable tmp as well.
User | Count |
---|---|
20 | |
14 | |
11 | |
8 | |
6 |
User | Count |
---|---|
23 | |
23 | |
20 | |
15 | |
10 |