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
Anonymous
Not applicable

Table Visualization by Customer breakdown by Type and Month

Hello Power BI Community


Can anyone please advise me on how to resolve this.

 

My use-case is that we have monthly finance transactional data for each month from Jan to May (e.g. Data source is SQL), bringing in the latest data every month. My Datasets each row consists of Month, Customer, Brand, Sales Price, and Volume and Data model consist of DateTable, where the month has one to many relationships with Customer Table. I manage to create DAX showing MTD & YTD calculation for [Volume], [GM], [ARP £/MT]. Please note [Volume], [GM], [ARP £/MT] these are measures created from monthly finance transactional data. I tried Summarise and Add column DAX nothing seems to be working out, may be i'm made some error. 

 

DAX Measures for Volume = Sum('Gross Margin'[Volume])
DAX Measure for ARP£/MT = (DIVIDE([Sale Price],[Volume]))

 

My final output would like to plot the data on a column chart by Type (Volume], ARP £/MT], [GM £/T] the columns would be stacked in each month to give the break-down by the customer by Brand. 

 

Table Chart Visualization formatTable Chart Visualization format

 

I want to create two table visualization one by MTD and another Cumulative total, without giving the grand total for ARP £/MT (Average Retail Price) & GM £/ MT, something like this (above mentioned format).

 

Appreciate your help in advance.😊

1 ACCEPTED SOLUTION
technolog
Super User
Super User

Hey there! I understand you're trying to create a table visualization in Power BI that breaks down by Customer, Brand, and Month, and you want to show MTD and cumulative totals for certain measures. Let's tackle this step by step.

Firstly, you've already created some DAX measures. Let's create the MTD and YTD measures for each of the metrics you mentioned:

MTD Volume:
MTD Volume = CALCULATE([Volume], DATESMTD('DateTable'[Date]))
YTD Volume:
YTD Volume = CALCULATE([Volume], DATESYTD('DateTable'[Date]))
MTD ARP £/MT:
MTD ARP £/MT = CALCULATE([ARP£/MT], DATESMTD('DateTable'[Date]))
YTD ARP £/MT:
YTD ARP £/MT = CALCULATE([ARP£/MT], DATESYTD('DateTable'[Date]))
MTD GM:
(You didn't provide the DAX for GM, so I'm assuming it's similar to Volume)
MTD GM = CALCULATE([GM], DATESMTD('DateTable'[Date]))
YTD GM:
YTD GM = CALCULATE([GM], DATESYTD('DateTable'[Date]))
Now, for the visualization:

For the column chart:
Drag the 'Month' column from your DateTable to the axis.
Drag the 'Customer' and 'Brand' fields to the legend or values area.
Drag your measures (Volume, ARP £/MT, GM £/T) to the values area. This should give you a stacked column chart with a breakdown by customer and brand for each month.
For the table visualizations:
Drag the 'Month', 'Customer', and 'Brand' fields to the rows area.
Drag the MTD measures (MTD Volume, MTD ARP £/MT, MTD GM) to the values area for the MTD table.
Drag the YTD measures (YTD Volume, YTD ARP £/MT, YTD GM) to the values area for the cumulative table.
To remove the grand total for ARP £/MT & GM £/ MT, click on the table visualization, go to the Format pane, and under the "Total" section, turn off the totals for ARP £/MT & GM £/ MT.

View solution in original post

1 REPLY 1
technolog
Super User
Super User

Hey there! I understand you're trying to create a table visualization in Power BI that breaks down by Customer, Brand, and Month, and you want to show MTD and cumulative totals for certain measures. Let's tackle this step by step.

Firstly, you've already created some DAX measures. Let's create the MTD and YTD measures for each of the metrics you mentioned:

MTD Volume:
MTD Volume = CALCULATE([Volume], DATESMTD('DateTable'[Date]))
YTD Volume:
YTD Volume = CALCULATE([Volume], DATESYTD('DateTable'[Date]))
MTD ARP £/MT:
MTD ARP £/MT = CALCULATE([ARP£/MT], DATESMTD('DateTable'[Date]))
YTD ARP £/MT:
YTD ARP £/MT = CALCULATE([ARP£/MT], DATESYTD('DateTable'[Date]))
MTD GM:
(You didn't provide the DAX for GM, so I'm assuming it's similar to Volume)
MTD GM = CALCULATE([GM], DATESMTD('DateTable'[Date]))
YTD GM:
YTD GM = CALCULATE([GM], DATESYTD('DateTable'[Date]))
Now, for the visualization:

For the column chart:
Drag the 'Month' column from your DateTable to the axis.
Drag the 'Customer' and 'Brand' fields to the legend or values area.
Drag your measures (Volume, ARP £/MT, GM £/T) to the values area. This should give you a stacked column chart with a breakdown by customer and brand for each month.
For the table visualizations:
Drag the 'Month', 'Customer', and 'Brand' fields to the rows area.
Drag the MTD measures (MTD Volume, MTD ARP £/MT, MTD GM) to the values area for the MTD table.
Drag the YTD measures (YTD Volume, YTD ARP £/MT, YTD GM) to the values area for the cumulative table.
To remove the grand total for ARP £/MT & GM £/ MT, click on the table visualization, go to the Format pane, and under the "Total" section, turn off the totals for ARP £/MT & GM £/ MT.

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.

Top Solution Authors