cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Comparing Year to Date vs. Last Year on a bar graph by Categories and Sub Categories

I have the following informaiton I am trying to put into side by side bar graphs, but having trouble with the caluculations working.

 

Graph 1 shows Last Year vs. Year to Date by Customer Complaint Category.

Graph 2 shows Last Year vs. Year to Date by Each Customer Complaint Sub Category.

 

For example, I can select a complaint category in the slicer or on the graph for Poor Product Quality, then Graph 2 should show each sub category under Poor Product Quality and the totals for each.

 

The issue I am having is the bars in both graphs for Last Year calculate and populate correctly. But the bars for Year to Date all show the over all total of complaints, not breaking them out by category.

 

In playing around with the "Drill Down" buttons, I can make Year to Date populate correctly, but then Last Year shows the overall total.

 

I've tried a few things but am at a loss at this point.

Capture1.PNGCapture2.PNG

1 ACCEPTED SOLUTION
New Member

Update. This doesn't appear to have been a DAX issue, but instead a few bad visualization field selection errors and bad data relationships. With some playing around and modifications today, it's working like a charm.

View solution in original post

3 REPLIES 3
New Member

Update. This doesn't appear to have been a DAX issue, but instead a few bad visualization field selection errors and bad data relationships. With some playing around and modifications today, it's working like a charm.

View solution in original post

New Member

@v-haibl-msft That may be the issue. Being new to Power BI, I'm still learning the ropes and did not know about DAX formulas, so I have not built any. Would that be a possible solution to build in DAX formulas and be the reason why one year works correctly but not the other?

 

Microsoft
Microsoft

@dlfritsche

 

This should be related to the DAX formulas you used. Please post a sample table, which fields do you put into the visuals and DAX formulas of calculated measure/column. If possible, you can upload your PBIX file to online file service (e.g. OneDrive) and share it. (Please make sure you’ve removed sensitive data before share it)

 

Best Regards,

Herbert

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors