Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have created a DAX query provide me with the difference between today() and an expiry date. The expiry date is on a table and differs with each row.
This is my query:-
DaystoExpiry = DATEDIFF(today(),DISTINCT('transactiondiscount'[Expiry_Date]),day)
That formula does not produce an error when I commit the formula. But breaks my table visual when I add it to the visual.
Is there a problem with my formula? Can it be imporoved?
Edited:
Ok, so I get this message from the visual
Solved! Go to Solution.
is it meausre or column?
if it is column remove distinct else replace distinct with max or selectedvalue.
measure DaystoExpiry = DATEDIFF(today(),Selectedvalue('transactiondiscount'[Expiry_Date]),day)
Column DaystoExpiry = DATEDIFF(today(),'transactiondiscount'[Expiry_Date],day)
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
is it meausre or column?
if it is column remove distinct else replace distinct with max or selectedvalue.
measure DaystoExpiry = DATEDIFF(today(),Selectedvalue('transactiondiscount'[Expiry_Date]),day)
Column DaystoExpiry = DATEDIFF(today(),'transactiondiscount'[Expiry_Date],day)
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
Nice!!
I had it as a measure. Made the suggested changes and it worked.
Kudos to you!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.