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.
Hey Everyone,
I saw a hope help online, also with the what if parameters, However I still couldn't get it to work like I hoped. Therefor I hoped someone could help me.
De data in the dashboeard are refreshed every day. Now some people would like to see the situation at different dates in the past.
For example, I would like to know how the situation of my data is 2 week ago.
To generate this, I created a what if parameter. There it can selected a date, that needs to visualized.
Since dates aren't possible, used the dateadd fuction and the last date refresh to calculated the dates for selection.
Now I want to use this selected value (what if parameter) in the data. There I might make a mistake, since it's not working as I hoped yet. IF the selected value is larger than the startdate and smaller than the enddate, than the status was active. I want to determine this for every record.
I tried :
IF(
, True(), False()
)
Hoewever, I seems like he always returns FALSE. Also if I only place SELECTEDVALUE('Par_Date'[SelectedDate]) >= CirkelTable[startdate] in the if statement expression, while the dates are smaller. So I know I am doing something wrong. But the selectedvalue does show the date selected.
I the end, I would like to see the records whereby my whatif parameter is between the start and end date. Maybe there is a beter method to do this. Could someone help me.
Thank you in advance
Solved! Go to Solution.
hi @Anonymous
First, for SELECTEDVALUE Function, it returns the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult.
https://docs.microsoft.com/en-us/dax/selectedvalue-function
Second, for your formula, it seems that it is a calculated column, you should know that:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
and you should use it in a FILTER of your measure.
If you still have the problem, please share your sample pbix file and your expected output. and i will give you further help.
Regards,
Lin
hi @Anonymous
First, for SELECTEDVALUE Function, it returns the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult.
https://docs.microsoft.com/en-us/dax/selectedvalue-function
Second, for your formula, it seems that it is a calculated column, you should know that:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
and you should use it in a FILTER of your measure.
If you still have the problem, please share your sample pbix file and your expected output. and i will give you further help.
Regards,
Lin
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
147 | |
109 | |
107 | |
85 | |
63 |