Forum Discussion
Truelearner
6 years agoHelper III
need help with dax
I have the table below where in i have original currency and transaction currency along with effective date and exchnage rate , i have this requirement where in which i want to create a table wi...
- 6 years ago
Your result does seem in line with the description.
Please find solution at https://www.dropbox.com/s/ow37w9hj8aro25z/LastMonthExchnageRate.pbix?dl=0
Use Max month as filter
v-gizhi-msft
6 years agoCommunity Support
Hi,
Create a MonthNo column first:
MonthNo = 'Table'[Effective Date].[MonthNo]Add an index column in Query Editor.
Then try this measure:
check = IF(MAX('Table'[Effective Date])=MAXX(FILTER(ALL('Table'),'Table'[MonthNo] in FILTERS('Table'[MonthNo])),'Table'[Effective Date]),1,0)Apply it to original table visual by setting check=1, it shows:
Then try this measure:
Previous exchnage rate = CALCULATE(MAX('Table'[Exchangerate]),FILTER(ALLSELECTED('Table'),'Table'[MonthNo]=MAX('Table'[MonthNo])-1))The result shows:
Tips: Based on your logic, i think the expected output is like the above not the screenshot you posted.
Please check it.
If i have understood your requirement, please for free to let me know.
Expect your reply!
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto Zhi