Forum Discussion
PowerBiDD
8 years agoFrequent Visitor
countrows YTD
Hello, I'm very new to powerbi and to this forum. My apologies upfront if I place this in the wrong section or if the question has been answered already. Even with the help of likewise posted mes...
PowerBiDD
8 years agoFrequent Visitor
Hi Xiaoxin
I don't know how I can add a file to my reply, so I am sharing a photo of the dashboard and one of the raw data.
The lower visuals should be a year-to-date line, but it's obviously not.
I hope this helps you.
Many thanks
Ashish_Mathur
Super User
8 years agoHi,
I would suggest the following:
- Append both mail datasets into a single one
- Create a relationship from the Date column appearing in the appended dataset to the date column in your Calendar Table
- In your visual drag Months from the Calendar Table to the X - axis
- Drag the Year (from the Calendar Table) to the slicer and select any one year
- Write this measure
=CALCULATE(COUNTROWS(Data),DATESYTD(Calendar[Date]))
Hope this helps.