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.
Solved! Go to Solution.
@Rngomoa Hi!
The issue with the second part of your DAX formula is that the COUNTX function is trying to count the distinct patient IDs in the result of the GROUPBY function, but the GROUPBY function is not returning a table with distinct patient IDs because the MAXX function is being used as an aggregator.
tx_curr =
VAR curdate = MAX(CalenderDate[dates])
RETURN
COUNTX(
FILTER(
ADDCOLUMNS(
SUMMARIZE(
Greencard,
Greencard[patient_id],
Greencard[mflcode],
"tx_curr2", CALCULATE(COUNT(Greencard[patient_id]), Greencard[visit_date] <= curdate && Greencard[visit_date] <= Greencard[ExitDate1])
),
"tx_curr3", IF([tx_curr2] > 0, 1, 0)
),
[tx_curr3] > 0
),
DISTINCT(Greencard[patient_id])
)
BBF
@Rngomoa Hi!
The issue with the second part of your DAX formula is that the COUNTX function is trying to count the distinct patient IDs in the result of the GROUPBY function, but the GROUPBY function is not returning a table with distinct patient IDs because the MAXX function is being used as an aggregator.
tx_curr =
VAR curdate = MAX(CalenderDate[dates])
RETURN
COUNTX(
FILTER(
ADDCOLUMNS(
SUMMARIZE(
Greencard,
Greencard[patient_id],
Greencard[mflcode],
"tx_curr2", CALCULATE(COUNT(Greencard[patient_id]), Greencard[visit_date] <= curdate && Greencard[visit_date] <= Greencard[ExitDate1])
),
"tx_curr3", IF([tx_curr2] > 0, 1, 0)
),
[tx_curr3] > 0
),
DISTINCT(Greencard[patient_id])
)
BBF
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
18 | |
16 | |
15 | |
12 | |
10 |