Forum Discussion
See just rows in common
- Anonymous3 years ago
Hi Anonymous ,
You can create a measure as below and apply the visual-level filter to filter the data with the condition(Flag is 1😞
Flag = VAR _selcode = SELECTEDVALUE ( 'Client'[cod_clie] ) VAR _tab1 = CALCULATETABLE ( VALUES ( 'Fact1'[Cod_cli] ), FILTER ( 'Fact1', 'Fact1'[Cod_cli] = _selcode ) ) VAR _tab2 = CALCULATETABLE ( VALUES ( 'Fact2'[Cod_cli] ), FILTER ( 'Fact2', 'Fact2'[Cod_cli] = _selcode ) ) RETURN IF ( _selcode IN _tab1 && _selcode IN _tab2, 1, 0 )Best Regards
Hi, thank you for your mensage and support.
you are able to see below the model and the PBX file.
I would like to see in my bar chart, just common clients and both fact tables. Sometimes I want to see all clients, sometimes, just common clients in both fact tables. Unfortunately, clients are dynamic and I can't manually apply a filter.https://drive.google.com/file/d/1FV6TAAAKHoPMt4xE14Ge8bahAXaqm7I5/view?usp=sharing
It will be like a select distinct in both cod client (Fact 1 and Fact2) applying and intersection and apply the result, filtering in the entire Dashboard.
Hi Anonymous ,
You can create a measure as below and apply the visual-level filter to filter the data with the condition(Flag is 1😞
Flag =
VAR _selcode =
SELECTEDVALUE ( 'Client'[cod_clie] )
VAR _tab1 =
CALCULATETABLE (
VALUES ( 'Fact1'[Cod_cli] ),
FILTER ( 'Fact1', 'Fact1'[Cod_cli] = _selcode )
)
VAR _tab2 =
CALCULATETABLE (
VALUES ( 'Fact2'[Cod_cli] ),
FILTER ( 'Fact2', 'Fact2'[Cod_cli] = _selcode )
)
RETURN
IF ( _selcode IN _tab1 && _selcode IN _tab2, 1, 0 )
Best Regards