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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Slicer only show availeble values

Hi, 

I have in this example 3 tables, DimMainAccount, Calendar and FctAmount.
The relationship is 1 to many with cross direction single from DimMainAccount and Calendar to FctAmount.
StarSchema.png
I have a matrix visual that shows a value (SelectedMeasure, that is a switchmeasure based on AccountingCurrencyAmount in FctAmount) per MainAccount Category.
But as you can see the slicer MainAccountCategory show all the values that are in the DimMainAccount table and not only the ones with a value.

I doesn't work to take the SelectedMeasure into the filter pane for the MainAccountCategory and take SelectedMeasure <> 0. 
I guess I need some kind of measure like:

weetom_0-1675339578272.png


Selected Measure with Filter =
VAR SelectedYear = SELECTEDVALUE(Calendar[Year])
VAR SelectedMonth = SELECTEDVALUE('Calendar'[MonthNo])
RETURN
CALCULATE(
  SUM(FctAmount[AccountingCurrencyAmount]),
  FILTER(
    DimMainAccount,
    SUMX(
        FILTER(FctAmount, FctAmount[AccountingDate] >= DATE(SelectedYear, SelectedMonth, 1) && FctAmount[AccountingDate] <= EOMONTH(DATE(SelectedYear, SelectedMonth, 1), 0)),
        FctAmount[AccountingCurrencyAmount]
    ) <> 0
  ),
  CALENDAR(MIN(Calendar[Date]),MAX(Calendar[Date])),
  ALL(Calendar[Year]),
  ALL('Calendar'[MonthNo])
)

That measure doesnt work if I choose a year and multiple months, does anyone have an input of how you can solve this?



 

2 REPLIES 2
ppm1
Solution Sage
Solution Sage

Please seet this article for a simple approach with ISEMPTY to get that effect.

Filter slicers without using bidirectional filters in Power BI - SQLBI

 

Pat

 

Microsoft Employee
Anonymous
Not applicable

Appricate your help, but unfortunatly it didnt worked out when choosing multiple Year + Months!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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