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).

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @Anonymous,

AFAIK, you cant directly aggregate with measure formulas. I'd like to suggest you take a look at the following line about measure total level calculations to use if statement to check the current row contents level and write total level formulas for calculating.
Measure Totals, The Final Word  
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
MFelix
Super User
Super User

Hi @Anonymous ,

 

You don't refer but I assume you have a year column somewhere in the data correct?

 

I would create a date column with end of month date to make the connection to calendar table using a date column.

 

This will allow you to make time inteliggence calculations (MTD, QTD, YTD).

 

Can you share a sample data?


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Thanks @MFelix for reaching out to me.

 

Please find attach a sample PBIX file with Gross Margin and Datetable with Y2020 data only and all the DAX measure created - 

https://drive.google.com/file/d/1aEJ1vpmqG2TXv1-8CpAIyiepxSxKETIa/view?usp=sharing

 

Also explained below the final output views, please note this is sample data (Data hirerarchy Category-->>Customer) and not properly aggregated, just created to give an overview on how the final output should look like. Appreciate your help in advance

 

PBIC SAMPLE.png

 

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.