Forum Discussion
Manually defining a variable for use in a measure
Hi MarcusClaudius,
Actually it is not possbile to achieve the exact same result as you excepted. However we can create a table and a slicer to work around. Here is the sample for your reference.
Here are the measures that I created in the sample file.
LY Year Ending = YEAR(SELECTEDVALUE(dimtime[Date]))-1 &"/013"
LY Year Opening = YEAR(SELECTEDVALUE(dimtime[Date]))-1&"/001"
Month details = "31st"& FORMAT(SELECTEDVALUE(dimtime[Date]),"mmmmyyyy")
Month name = FORMAT(SELECTEDVALUE(dimtime[Date]),"mmmm")
Year Ending = YEAR(SELECTEDVALUE(dimtime[Date])) &"/013"
Year Opening = YEAR(SELECTEDVALUE(dimtime[Date]))&"/001"
For more details, please check the pbix as attached. And could you please tell me what is the logic of the Current Month?
Regards,
Frank
- v-frfei-msft8 years ago
Community Support
Hi MarcusClaudius,
Does that make sense? If so, kindly mark my answer as a solution to close the case.
Regards,
Frank
- MarcusClaudius7 years agoRegular Visitor
Apologies, my machine has been down this past week.
IT said that Power BI corrupted it.
I had to have the machine reimaged.
And now I can finally get round to trying your solution out.
Thanks for you help
Mark
- v-frfei-msft7 years ago
Community Support
Hi MarcusClaudius,
Has your problem been solved? If any other question, feel free to let me know please.
Regards,
Frank