Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello everyone, i have 2 data tables. One of them including month, id, status and sales. The other data table includes month, id and Transaction.
What i desire is to show in a clustered stacked column chart the amount of sales, count transtions and status after i have filtered these by the ID number.
Example:
Is it possible???
Data Info:
https://docs.google.com/spreadsheets/d/1oFMtGZHqbupQrCwnVdfM0UomFkG3EzwAub027AWr5kE/edit#gid=0
First Data Table | |||
Month | ID | Sales | Status |
Jan | 1 | 100 | 0 |
Feb | 1 | 120 | 0 |
Mar | 1 | 220 | 2 |
Apr | 1 | 230 | 0 |
Jan | 2 | 180 | 0 |
Feb | 2 | 220 | 2 |
Mar | 2 | 230 | 0 |
Apr | 2 | 190 | 0 |
Jan | 3 | 195 | 5 |
Feb | 3 | 240 | 2 |
Mar | 3 | 230 | 0 |
Apr | 3 | 220 | 2 |
2nd Data Table | ||
Month | ID | Transaction |
Feb | 2 | A1 |
Feb | 3 | B3 |
Mar | 1 | C2 |
Solved! Go to Solution.
hi, @hgzelaya
You could use this way:
Step1:
Add two dim tables: Dim Month table and Dim ID table
Step2:
Then create the relationship as below:
Step3:
Create three measure for "amount of sales, count transtions and status"
amount of sales = CALCULATE(SUM(Table1[Sales])) count transtions = CALCULATE(COUNTA(Table2[Transaction])) Status measure = CALCULATE(SUM(Table1[Status]))
From your screenshot, if it is sum(status)? if not just replace SUM(Table1[Status]) with COUNTA(Table1[Status])
Step4:
Then use Combo Chart in Power BI, use Month field from Dim Month table as X-axis, ID field from DIm ID table as a slicer.
https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-combo-chart
Result:
here is sample pbix file, please try it.
Best Regards,
Lin
hi, @hgzelaya
You could use this way:
Step1:
Add two dim tables: Dim Month table and Dim ID table
Step2:
Then create the relationship as below:
Step3:
Create three measure for "amount of sales, count transtions and status"
amount of sales = CALCULATE(SUM(Table1[Sales])) count transtions = CALCULATE(COUNTA(Table2[Transaction])) Status measure = CALCULATE(SUM(Table1[Status]))
From your screenshot, if it is sum(status)? if not just replace SUM(Table1[Status]) with COUNTA(Table1[Status])
Step4:
Then use Combo Chart in Power BI, use Month field from Dim Month table as X-axis, ID field from DIm ID table as a slicer.
https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-combo-chart
Result:
here is sample pbix file, please try it.
Best Regards,
Lin
Thank you so much it worked as i needed!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
218 | |
88 | |
83 | |
65 | |
56 |