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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello Team,
I have difficulty on converting this calc that is pulling from 2 different tables:
IF [X-Plant Material Status]="50" THEN (12-(DATEDIFF('month',[Date from which the X-distr.-chain material status is valid (date)],TODAY())))
ELSEIF [X-Plant Material Status]="60" THEN (6-(DATEDIFF('month',[Date from which the X-distr.-chain material status is valid (date)],TODAY())))
ELSEIF [X-Plant Material Status]="65" THEN (6-(DATEDIFF('month',[Date from which the X-distr.-chain material status is valid (date)],TODAY())))
ELSEIF [X-Plant Material Status]="70" THEN 0
ELSEIF [X-Plant Material Status]="75" THEN 0
ELSEIF [X-Plant Material Status]="80" THEN 0
ELSEIF [X-Plant Material Status]="85" THEN 0 END
Solved! Go to Solution.
@g-wizard So, in DAX that would be:
SWITCH( [X-Plant Material Status],
"50", (12-(DATEDIFF('month',[Date from which the X-distr.-chain material status is valid (date)],TODAY()))),
"60", (6-(DATEDIFF('month',[Date from which the X-distr.-chain material status is valid (date)],TODAY()))),
"65", (6-(DATEDIFF('month',[Date from which the X-distr.-chain material status is valid (date)],TODAY()))),
"70", 0,
"75", 0,
"80", 0,
"85", 0
)
@g-wizard So, in DAX that would be:
SWITCH( [X-Plant Material Status],
"50", (12-(DATEDIFF('month',[Date from which the X-distr.-chain material status is valid (date)],TODAY()))),
"60", (6-(DATEDIFF('month',[Date from which the X-distr.-chain material status is valid (date)],TODAY()))),
"65", (6-(DATEDIFF('month',[Date from which the X-distr.-chain material status is valid (date)],TODAY()))),
"70", 0,
"75", 0,
"80", 0,
"85", 0
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 38 | |
| 36 | |
| 29 | |
| 28 |
| User | Count |
|---|---|
| 127 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |