Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi, I want to compare values using a clustered column chart, in which these values are based on the parameters that I select on the slicers. These values are from the same dataset. You can see the example data (excel and pbix): Here
The end goal is to have 2 groups of slicers ( left and right) and the values on the chart will change according to the selected parameters on the slicers of each group. You can find the end result that I want on the link above.
I realized that using this way might not be the best way since the dashboard became heavy (long loading period) especially if I have a huge dataset (since I need to duplicate the dataset into two eventhough they are the same). Therefore, I would like to ask for suggestion/help on how to do it better, probably using DAX to get the result that I wanted?
Any help will be much appreciated, thank you!
Solved! Go to Solution.
Hi @budhie ,
Instead of replicating the sales and the database just recreate the tables that you need to use for your slicers in this case create disconnected tables for the Dates (includes Month and Year), Countries (includes City, Province , City),
Customer Gender, Product Type then do the following two measures:
Value 1 = CALCULATE(
SUM(Sales[Total Price]),
Sales[Product Type] in VALUES('Product Type 1'[Product Type]),
Sales[Date] in VALUES('Dates 1'[Date]),
Database[City] in VALUES('Country 1'[City]),
Database[Province] in VALUES('Country 1'[Province]),
Database[Country] in VALUES('Country 1'[Country]),
Database[Customer Gender] in VALUES('Customer Gender 1'[Customer Gender])
)
Value 2 = CALCULATE(
SUM(Sales[Total Price]),
Sales[Product Type] in VALUES('Product Type 2'[Product Type]),
Sales[Date] in VALUES('Dates 2'[Date]),
Database[City] in VALUES('Country 2'[City]),
Database[Province] in VALUES('Country 2'[Province]),
Database[Country] in VALUES('Country 2'[Country]),
Database[Customer Gender] in VALUES('Customer Gender 2'[Customer Gender])
)
Create the slicer pane accordingly to the table numbers and measures
Check PBIX file attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @budhie ,
Instead of replicating the sales and the database just recreate the tables that you need to use for your slicers in this case create disconnected tables for the Dates (includes Month and Year), Countries (includes City, Province , City),
Customer Gender, Product Type then do the following two measures:
Value 1 = CALCULATE(
SUM(Sales[Total Price]),
Sales[Product Type] in VALUES('Product Type 1'[Product Type]),
Sales[Date] in VALUES('Dates 1'[Date]),
Database[City] in VALUES('Country 1'[City]),
Database[Province] in VALUES('Country 1'[Province]),
Database[Country] in VALUES('Country 1'[Country]),
Database[Customer Gender] in VALUES('Customer Gender 1'[Customer Gender])
)
Value 2 = CALCULATE(
SUM(Sales[Total Price]),
Sales[Product Type] in VALUES('Product Type 2'[Product Type]),
Sales[Date] in VALUES('Dates 2'[Date]),
Database[City] in VALUES('Country 2'[City]),
Database[Province] in VALUES('Country 2'[Province]),
Database[Country] in VALUES('Country 2'[Country]),
Database[Customer Gender] in VALUES('Customer Gender 2'[Customer Gender])
)
Create the slicer pane accordingly to the table numbers and measures
Check PBIX file attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @budhie ,
Have you tried using field parameters for this?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi Felix @MFelix , thanks for your response. I have never utilize Field Parameter before. After do some checking, I think the way how Field Parameter works more on to change the x-axis of the chart based on the selected parameter? Where on my case, the x-axis will remain the same and the only changes are on the y-axis based on the parameters that I select on the slicers
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
78 | |
52 | |
39 | |
35 |
User | Count |
---|---|
94 | |
79 | |
51 | |
47 | |
47 |