Forum Discussion
How to Compare Two Column Dynamically?
- 5 years ago
amitchandak
Hello Sir, I have got the solution
Your solution is nearby same but with the relation of two date table my slicer also filtered.So I have create Two table with My financial Year column
First Table Name =Compare From
Second Table Name = Compare ToCompare From = VALUES(Financials[Financial Year])
Then Second
Compare To = VALUES(Financials[Financial Year])
Then we create one measure for remove same selected value from other slicer
So the measure for this
FY Selection Control = IF(SELECTEDVALUE('Compare From'[From Financial Year]) = SELECTEDVALUE('Compare To'[To Financial Year]),0,1)
Then apply this measure in visual level filter & set value to "1".
Then Create Two measure for Calculate Sales :
From Sales = CALCULATE([Total Sales],FILTER(Financials, Financials[Financial Year] IN {SELECTEDVALUE('Compare From'[From Financial Year])}))
To Sales = CALCULATE([Total Sales],FILTER(Financials, Financials[Financial Year] IN {SELECTEDVALUE('Compare To'[To Financial Year])}))
Then apply this two measure in your visual.
- 5 years ago
Here is the screenshot for the flow:
Two new tables unrelated to any other table in the model.
Create like this :
The selection filter is then applied at the visual level as follows:
The last sales measure is then applied to the visual.
Here's the last output:
amitchandak Thank you so much for the quick response.
Can i give relationship of second Calendar table with Financial Table?