Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
conroy
Frequent Visitor

Bar Chart with slicer from disconnected table does not response to slicer

Hi,

 

I need to display a bar chart and a card showing sales of current period.

 

Then I also need a card showing sales of previous period and a card to show the difference between current and previous period.

 

There is a slicer for user to choose from past 7 days, 14 days and 21 days.

 

However, the bar chart is not responding even I have added the column from disconnected table to visual level filter.

 

Here is the file. Please help!

sales demo data.pbix

Thanks!

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @conroy

From your pbix, it seems why you create column "CUT OFF DATE" and "DISPLAY" is to show the current period (selected in the slicer) before the end of year 2011.

Such as, if you select 1-7 in the slicer, the bar chart should show date from 2011/12/25-31, if 1-14, it should show from 2011/12/18-31, right?

If so, you could cretae two measure to replace the columns above, then add it yo the visual level filter.

Measure1->column "CUT OFF DATE"

Measure2->column "DISPLAY"

Measure 1 = CALCULATE(MAX('Sales Table'[Date]),ALL('Sales Table')) - 'Sales Table'[PERIOD VALUE]
Measure 2 = IF(MAX('Sales Table'[Date]) > [Measure 1],"Y","N")

 

Please see the result on page2.

 

Best Regards

Maggie

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @conroy

From your pbix, it seems why you create column "CUT OFF DATE" and "DISPLAY" is to show the current period (selected in the slicer) before the end of year 2011.

Such as, if you select 1-7 in the slicer, the bar chart should show date from 2011/12/25-31, if 1-14, it should show from 2011/12/18-31, right?

If so, you could cretae two measure to replace the columns above, then add it yo the visual level filter.

Measure1->column "CUT OFF DATE"

Measure2->column "DISPLAY"

Measure 1 = CALCULATE(MAX('Sales Table'[Date]),ALL('Sales Table')) - 'Sales Table'[PERIOD VALUE]
Measure 2 = IF(MAX('Sales Table'[Date]) > [Measure 1],"Y","N")

 

Please see the result on page2.

 

Best Regards

Maggie

Hi @v-juanli-msft it works, you are awesome! thank you!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors