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.
HiTeam,
I am having the data with the columns like Date and amount .
We are plotted column chart with two values (Current year amt and Previous amt).
Requirement:
1. Current year amount data should show till the today
2. Previous year amount data should display after the today
Sample:
Expected Output:
Let me know if you need any details
Thanks,
Siddanth
Solved! Go to Solution.
@Anonymous , Example with date table
Year behind amount= CALCULATE(SUM(Sales[Amount]),dateadd('Date'[Date],-1,Year))
Amount =SUM(Sales[Amount]) //this year amount
measure =
if(max(Date[Date]) <=today(), [Amount], [Year behind amount])
Hi @Anonymous ,
Could you please provide some sample data (exclude sensitive data) and the formula of [PY_Amount] and [CY_Amount] if they are measure or calculated column in order to find the problem cause and provide a suitable solution? Thank you.
In addition, please review the following threads and check whether they can help you resolve the problem.
Comparing this year and last year measure on a bar chart
How to compare Last year and Current Year sales in Power BI?
Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.
@Anonymous , Example with date table
Year behind amount= CALCULATE(SUM(Sales[Amount]),dateadd('Date'[Date],-1,Year))
Amount =SUM(Sales[Amount]) //this year amount
measure =
if(max(Date[Date]) <=today(), [Amount], [Year behind amount])
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |