Forum Discussion
mbylicki
5 years agoFrequent Visitor
Compare Data based on 2 selected values in 1 column
Hi, we're currently switching from Qlik into Power BI, and we're facing with such problem. We load several files into one table (simple example below) What we want to achieve is to ...
Anonymous
5 years agoNot applicable
Hi @mbylicki ,
The Dax function of Selectvalue is suitable for single sign-on. It is suitable for when only one is selected, there will be a value, otherwise there will be no value
For example: I need to select a month and display the value of the previous month, this can use selectvalue
Dax formula:
Measure =
var _1=SELECTEDVALUE('Table'[month])
var _2=CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[month]=_1-1))
return _2Put month into slice and measure into card. By selecting May, the amount in April is displayed
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.