Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I would like to calculate a field in Dax (some equlilvant would be great) that references a dynamic DATE parameter. The column would output text, but that text change if the date changed.
Example:
Solved! Go to Solution.
Hi @Jacob1832 ,
Please refer to the blog to see if it helps you.
Field Parameters in Power BI - Microsoft Power BI Community
If you want to dynamically switch values, we can also use the SWITCH TRUE method. However, the value returned by the SWITCH TRUE method can only be in one format, and Field Parameters can dynamically display values in different formats.
In short, Field parameters enable dynamic dimensions and calculations, Including: dynamic axis, dynamic legend and dynamic value.
Field parameters are useful because they allow users to seamlessly change the columns used in visual objects. Field parameters can provide a very customizable user experience.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Jacob1832 ,
There is nothing error with the formula. Could you please provide more details with the desired output?
Could you please provide your pbix file without privacy information and desired output with more details?
How to Get Your Question Answered Quickly
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-polly-msf
Im am thinking of a what-if paramater like the built in one, but for a date field that i could then reference in an IF statment on a table, and the output of that if statment would change if i change the parameter date.
Hi @Jacob1832 ,
Please refer to the blog to see if it helps you.
Field Parameters in Power BI - Microsoft Power BI Community
If you want to dynamically switch values, we can also use the SWITCH TRUE method. However, the value returned by the SWITCH TRUE method can only be in one format, and Field Parameters can dynamically display values in different formats.
In short, Field parameters enable dynamic dimensions and calculations, Including: dynamic axis, dynamic legend and dynamic value.
Field parameters are useful because they allow users to seamlessly change the columns used in visual objects. Field parameters can provide a very customizable user experience.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I will work on a sharable PBIX file. I should have been clearer. I dont know how to create the dynamic DateParamater in a way that will change the output of the column when i change the date. The desired output of the formula is a text string. And that text string should change when i change the DateParamater. I dont know how to create the date parameter. Do I create a new table? How do i connect it to the table the formula resides in so it can reference the date? If i connect it, wouldnt the connection filter override the if statement?
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |