Forum Discussion
How to use DAX formula SELECTEDVALUE with Field Parameters
Dear Power BI community,
I would like to ask for your help as I am trying to use DAX formula SELECTEDVALUE based on field parameters, however it is not doable based on the following error message:
IF user selects between two value the (Amount USD & Amount LCL) the calculation should be changing based on that:
DAX formula :
Field Parameter:
Visualization selection for Amount USD & Amount LCL:
Would it be possible for someone to help how to change the DAX formula SELECTEDVALUE part to make it work?
Thank you for your advice in advance.
Wishing you a wonderful date.
Adam
Can you perhaps upload a example file without sensitve datas?
Other post to field parameters
It seems to be possible. Perhaps try first to access only to the field parameter value?Did you try to add a "calculate" in the var Lastyeardynamic:
Lastyeardynamic = calculate(max(DWH[year])) ?
7 Replies
- andhiii079845
Solution Sage
Can you perhaps upload a example file without sensitve datas?
Other post to field parameters
It seems to be possible. Perhaps try first to access only to the field parameter value? - andhiii079845
Solution Sage
One question: Why it is important to use field parameters instead of a regular table / calculated table?
- AdamMetz23
Advocate I
Thank you Andhi for your quick reply.
Actually the main reason for that is that this was the only way (based on my knowledge) how I could dynamically change the column chart visualization Y axis between amount usd and amount lcl based on the field parameter selection:
Is it inefficient to do so?
Thank you,Adam
- andhiii079845
Solution Sage
What was the solution now in your case ? 🙂
- AdamMetz23
Advocate I
I have added the year column values explicitly instead of using a MIN & MAX measure to find the first and last year in the year column.
I am not 100% clear how it connects to the original issue to be honest but solved the problem.
- andhiii079845
Solution Sage
Did you try to add a "calculate" in the var Lastyeardynamic:
Lastyeardynamic = calculate(max(DWH[year])) ?