Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
dlfritsche
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
dlfritsche
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
dlfritsche
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.

dlfritsche
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?

 

v-haibl-msft
Employee
Employee

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.