Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Greetings I have a problem with a table, the calculation of one of its columns depends on an arbitrary date, for example:
Column-if(date-"10-09-2020",1,0)
I need to analyze and graph this table by varying this arbitrary date, I had thought of a slicer but from what I understand it is NOT possible to get the dates that appear there for my formula, is there any other option?
Solved! Go to Solution.
Hi @logrt ,
We can create a date table to be the arbitrary date and create a measure to meet your requirement.
1. Create a date table, then create a slicer using it.
Date = CALENDARAUTO()
2. Then we can create a measure to get the result.
Column-if =
var _select = SELECTEDVALUE('Date'[Date])
var _condition = IF(_select=MAX('Table'[Date]),1,0)
return
SUM('Table'[value]) * _condition
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi @logrt ,
We can create a date table to be the arbitrary date and create a measure to meet your requirement.
1. Create a date table, then create a slicer using it.
Date = CALENDARAUTO()
2. Then we can create a measure to get the result.
Column-if =
var _select = SELECTEDVALUE('Date'[Date])
var _condition = IF(_select=MAX('Table'[Date]),1,0)
return
SUM('Table'[value]) * _condition
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
@logrt , Upu can not use slicer value in a column.
You can try in column-like
if([date] > date(2019,10,09),1,0)
You can create a measure like
if(max(Date[date]) > selectedvalue(Date[Date]),1,0)
Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |