Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Experts,
Suppose we have region and city and a user selected filter by region.
If user chose one single region, there is a monthly trend line chart by city.( cities for each line by selected single region)
If user chose all or multiple region, there is a monthly trend line chart by region.(regions for each line)
Anyone can help?
Best Regards
Bruce Chen
Solved! Go to Solution.
Hi @Anonymous ,
We can create a calculated table to work on it. One sample for your reference. Please check the following steps as below.
1. Create a calculated table and make it related to the fact table.
di = UNION(VALUES('Table'[city]),VALUES('Table'[region]))
2. Then we can create a measure as below to get the excepted result as we need.
Measure = IF ( ISFILTERED ( 'Table'[city] ), SUM ( 'Table'[amount] ), IF ( ISFILTERED ( 'Table'[region] ), CALCULATE ( SUM ( 'Table'[amount] ), USERELATIONSHIP ( di[city / region], 'Table'[region] ) ) ) )
BTW, pbix as attached.
Hi @Anonymous ,
We can create a calculated table to work on it. One sample for your reference. Please check the following steps as below.
1. Create a calculated table and make it related to the fact table.
di = UNION(VALUES('Table'[city]),VALUES('Table'[region]))
2. Then we can create a measure as below to get the excepted result as we need.
Measure = IF ( ISFILTERED ( 'Table'[city] ), SUM ( 'Table'[amount] ), IF ( ISFILTERED ( 'Table'[region] ), CALCULATE ( SUM ( 'Table'[amount] ), USERELATIONSHIP ( di[city / region], 'Table'[region] ) ) ) )
BTW, pbix as attached.
Hi @Anonymous
Unfortunately, there is no way to switch dynamically between columns or use measures in the Legend field of visuals, however, it would be a very powerful future.