Forum Discussion
stacked column display does not change with slicer
- Anonymous10 years ago
Hi sonali_powerbi,
>> So if I have a similar table B, I cannot link YearMonth columns in the two tables, as it will be a many-many connection.
I’d like to suggest you use CALENDAR function to add ‘CALENDAR’ table to link other tables which contains the data column.
Below is the Sample:
1. Build two tables to test.
‘DateAmount’
‘MasterYearMonth’
2. Add a calendar Table with date from above tables, and create relationships among those tables. (Since both tables contain the duplicate records, it’s not able to build a relationship.)
Dax: CALENDARTable = CALENDAR(MIN(MIN(DateAmount[Date]),MIN(MasterYearMonth[Date])),MAX(MAX(DateAmount[Date]),MAX(MasterYearMonth[Date])))
Create the relationship:
3. Use Calendar table to filter the records.(Below is the visual’s struct and screenshots)
Stacked bar chart:
Clustered bar chart:
Slicer:
Use slicer to filter both table:
If above is not help, please provide more detial and feel free to let me know.
Regards,
Xiaoxin Sheng
Hi sonali_powerbi,
>> So if I have a similar table B, I cannot link YearMonth columns in the two tables, as it will be a many-many connection.
I’d like to suggest you use CALENDAR function to add ‘CALENDAR’ table to link other tables which contains the data column.
Below is the Sample:
1. Build two tables to test.
‘DateAmount’
‘MasterYearMonth’
2. Add a calendar Table with date from above tables, and create relationships among those tables. (Since both tables contain the duplicate records, it’s not able to build a relationship.)
Dax: CALENDARTable = CALENDAR(MIN(MIN(DateAmount[Date]),MIN(MasterYearMonth[Date])),MAX(MAX(DateAmount[Date]),MAX(MasterYearMonth[Date])))
Create the relationship:
3. Use Calendar table to filter the records.(Below is the visual’s struct and screenshots)
Stacked bar chart:
Clustered bar chart:
Slicer:
Use slicer to filter both table:
If above is not help, please provide more detial and feel free to let me know.
Regards,
Xiaoxin Sheng
This works, Xiaoxin. Thank you so much.