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.
Hello,
I'm trying to find the right YTD calculation to implement the new matrix visual. For example, say the date field = Master[Created Date].
I created the following --> Bid Year = Master[Created Date].Year to use as a row in the visual.
Then, I would like to display the YTD calculation for the last 2 years for Bid Volume. What's the correct syntax?
Currently, it's calculating for the full year in 2015 and 2016. Please see below:
Thanks in advance for help!
Can you share your data model? Do you have dedicated calendar table which is best practice for time intelligence analysis.
Here is example link to create calendar table and then we can add measure for YTD.
There are my thread in the forum to address this, here is link to one such thread.
Thanks,
P
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Sorry for the late reply. Yes, I have a date table:
Date = ADDCOLUMNS(CALENDAR(DATE(2000,1,1),DATE(2025,12,31)),
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
"Year", YEAR ( [Date] ),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "MM YYYY" ),
"YearMonthShort", FORMAT ( [Date], "mmm YYYY" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date] ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "dddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" )
)
And here is one variable I'm trying to calculate using the new matrix preview visual:
Bid Volume = DistinctCount(Master[Bid_Number__c])
I do know how to calculate the YTD value
Bid Value = Calculate(Distinctcount(Master[Bid_Number_c]),Year(Master[CreatedDate)=Year(Today()))
The problem is that it will calculate it for 2017. And when I use the new matrix visual with using BidYear = Master[CreatedDate].[Year] as a row value, it will only show data for 2017.
here is the link for YTD calculation
Hope it is helpful, feel free to reach out if need further help.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
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 |
---|---|
114 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |