Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello, I would like to use distinctcount function for the situation below
here is the raw data.
In order to get the values, I made dax measures below and added a new column
but it did not work.
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------
So Could you kindly help me with this issue?
Machine | Week | Recipe |
| What I would like to get = (distict value of recipes for each machine on last 4weeks) | ||
A | 202301 | a1 | 1 (=a1) | |||
B | 202301 | b1 | 1 | |||
C | 202301 | c1 | 1 | |||
... | ... | .... | ... | |||
A | 202302 | a2 | 2 (=a1,a2) | |||
A | 202303 | a2 | 2 (=a1,a2) | |||
A | 202304 | a3 | 3 (=a1,a2,a3) | |||
A | 202305 | a3 | 2 (=a2,a3) |
Thank you in advance
use variables to calculate the current week. Use REMOVEFILTERS on the recipe. Note: This is a measure - could be a calculated column too if there are no filter impacts.