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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
JohannTTG
Helper I
Helper I

Always display row of a table

Hi,

I run into a problem ...

 

First, there is a Dimension-Table that holds some categories, e.g. A, B, C

With a slicer-visuals the user can select some of them.

 

There exists a relation to a Fact-table. In the Fact-table is a column with the same categories and the user selects part of the fact table using the slicer. All works pretty fine.

 

The new request and my problem:

New data are stored in the fact table and it could happen that the new data have some invalid categories (e.g. X,Y, ...)

The customer wants that these illegal entries are always displayed in the very same table visual, regardless what is selected in the slicer.

 

Example: The slicer is set to category "A", so in the table visual the user wants to see all entries that have category "A" and all entries with illegal categories (other than "A", "B", "C").

 

How to do this?

 

Any help is apprecited!

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@JohannTTG , Better to keep the category as an independent table and try like

 

new measure =
var _sel = allselected(category[category])
var _sel1 = allselected(Table[category])
Var _sel2 = union(_sel, except(_sel1,_sel))
return
calculate(sum(Table[value]), filter(Table, Table[category] in _sel2))

 

////////

with join

 

new measure =
var _sel = allselected(category[category])
var _sel1 = all(Table[category])
Var _sel2 = union(_sel, except(_sel1,_sel))
return
calculate(sum(Table[value]), filter(Table, Table[category] in _sel2),all(category[category]))

View solution in original post

2 REPLIES 2
JohannTTG
Helper I
Helper I

Bingo - that helps, thank you!

amitchandak
Super User
Super User

@JohannTTG , Better to keep the category as an independent table and try like

 

new measure =
var _sel = allselected(category[category])
var _sel1 = allselected(Table[category])
Var _sel2 = union(_sel, except(_sel1,_sel))
return
calculate(sum(Table[value]), filter(Table, Table[category] in _sel2))

 

////////

with join

 

new measure =
var _sel = allselected(category[category])
var _sel1 = all(Table[category])
Var _sel2 = union(_sel, except(_sel1,_sel))
return
calculate(sum(Table[value]), filter(Table, Table[category] in _sel2),all(category[category]))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.