Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I would like to make that if user select filter box it getting different values. Filter
I am having three different cases:
If I select Be kasos I should get value
Solved! Go to Solution.
Hi @Analitika ,
I create a sample to have a test. I think you can try this code to achieve your goal.
Sales Amount =
VAR _COUNT =
CALCULATE ( DISTINCTCOUNT ( 'Pajamu vaizdavimas'[Parinkimas 4] ) )
RETURN
IF (
ISFILTERED ( 'Pajamu vaizdavimas'[Parinkimas 4] ),
SWITCH (
TRUE (),
_COUNT = 2
&& MAX ( 'Pajamu vaizdavimas'[Parinkimas 4] ) IN { "Be kasos", "Su kasa" }, [USED OK Pardavimai],
_COUNT = 1
&& MAX ( 'Pajamu vaizdavimas'[Parinkimas 4] ) = "Be kasos", [USED Pardavimai be kasu],
_COUNT = 1
&& MAX ( 'Pajamu vaizdavimas'[Parinkimas 4] ) = "Su kasa", [USED OK Pardavimai],
0
),
0
)
In my sample [USED Pardavimai be kasu] = 1 and [USED OK Pardavimai] = 2. Result is as below.
No selection:
Select Be kasos:
Select Su kasa:
Select Both:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Analitika ,
I create a sample to have a test. I think you can try this code to achieve your goal.
Sales Amount =
VAR _COUNT =
CALCULATE ( DISTINCTCOUNT ( 'Pajamu vaizdavimas'[Parinkimas 4] ) )
RETURN
IF (
ISFILTERED ( 'Pajamu vaizdavimas'[Parinkimas 4] ),
SWITCH (
TRUE (),
_COUNT = 2
&& MAX ( 'Pajamu vaizdavimas'[Parinkimas 4] ) IN { "Be kasos", "Su kasa" }, [USED OK Pardavimai],
_COUNT = 1
&& MAX ( 'Pajamu vaizdavimas'[Parinkimas 4] ) = "Be kasos", [USED Pardavimai be kasu],
_COUNT = 1
&& MAX ( 'Pajamu vaizdavimas'[Parinkimas 4] ) = "Su kasa", [USED OK Pardavimai],
0
),
0
)
In my sample [USED Pardavimai be kasu] = 1 and [USED OK Pardavimai] = 2. Result is as below.
No selection:
Select Be kasos:
Select Su kasa:
Select Both:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
87 | |
54 | |
45 | |
40 | |
36 |