Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Guys,
I am comparing the current year with last year sales and i used SAMEPERIODLASTYEAR for calclating the last year value but the problem is if i click the year filter say 2018 it shows the 2018 value in the current year but it is not showing the last year 2017 value. it shows the last year as blank. I had connected the data source Live through SSAS Cube. Please help me with it and provide me an alternative solution.
Hi @Anonymous,
did you solve your problem?
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
Hi @Anonymous ,
could you post your YTD_1 DAX formula?
Hi,
You must create a Calendar Table with a proper relationship from the Date column of your Data Table to the Date column of your Calendar Table. In the Calendar Table, create a calculated column to extract the Year
Year = Year(Calendar[Date])
Create a slicer of Year and select any one year.
Write these measures
Revenue = SUM(Data[Values])
LY revenue = CALCULATE([Revenue],PREVIOUSYEAR(Calendar[Date])
Hope this helps.
@Ashish_Mathur I am already having the calender table as dim date and when i used it iam still facing the same issue
YTD_1 = sum(Table1[Amount])
Hi,
Share the link from where i can download the PBI file.
Hi @Anonymous ,
I create a simple example and it works well.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
It's just this relationship in the example I created. What is your data format? If you don't mind, please share me some sample data, not real data.
Best Regards,
Icey
Hi @Anonymous ,
please check if the date table is mark as date table.
https://docs.microsoft.com/en-us/analysis-services/tutorial-tabular-1200/lesson-3-mark-as-date-table
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
Hi @Anonymous ,
do you use a date table?
Could you post your DAX and a screenshot of the model view?
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
80 | |
67 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |