Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
28 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
46 |