The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello, I'm kind stuck here.
I have 3 columns of the date type which, in one contains the PC creation date; in the second column creation date CP; and in the third column creation date NE.
I need to create a filter that gives me results like:
PAID (Filter PC containing NE and CP);
OPEN (Filter PC that contains NE and does not contain CP);
ALL (Filter PC containing NE and whether or not CP)
How can I filter the 3 columns to compare whether or not there are values in the same rows? And so do the filter?
Solved! Go to Solution.
Hi @leandroparischi ,
Would you please create a table that contains on column for "PAID","OPEN","ALL" for slicer, and refer to the following measure:
measure =
VAR CPVALUE =
CALCULATETABLE ( VALUES ( 'Table'[creation date NE] ), ALL ( 'Table' ) )
VAR NEVALUE =
CALCULATETABLE ( VALUES ( 'Table1'[creation date NE] ), ALL ( 'Table1' ) )
RETURN
SWITCH (
SELECTEDVALUE ( 'Slicer'[Column] ),
"PAID", CALCULATE (
....,
FILTER (
Table3,
Table3[PC creation date] IN CPVALUE
&& Table3[PC creation date] IN NEVALUE
)
),
"OPEN", CALCULATE (
....,
FILTER (
Table3,
NOT ( Table3[PC creation date] IN CPVALUE )
&& Table3[ PC creation date] IN NEVALUE
)
),
"ALL", CALCULATE (
.....,
FILTER ( Table3, Table3[PC creation date] IN CPVALUE )
&& NOT ( Table3[PC creation date] IN NEVALUE )
)
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @leandroparischi ,
Would you please create a table that contains on column for "PAID","OPEN","ALL" for slicer, and refer to the following measure:
measure =
VAR CPVALUE =
CALCULATETABLE ( VALUES ( 'Table'[creation date NE] ), ALL ( 'Table' ) )
VAR NEVALUE =
CALCULATETABLE ( VALUES ( 'Table1'[creation date NE] ), ALL ( 'Table1' ) )
RETURN
SWITCH (
SELECTEDVALUE ( 'Slicer'[Column] ),
"PAID", CALCULATE (
....,
FILTER (
Table3,
Table3[PC creation date] IN CPVALUE
&& Table3[PC creation date] IN NEVALUE
)
),
"OPEN", CALCULATE (
....,
FILTER (
Table3,
NOT ( Table3[PC creation date] IN CPVALUE )
&& Table3[ PC creation date] IN NEVALUE
)
),
"ALL", CALCULATE (
.....,
FILTER ( Table3, Table3[PC creation date] IN CPVALUE )
&& NOT ( Table3[PC creation date] IN NEVALUE )
)
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
30 |
User | Count |
---|---|
181 | |
88 | |
71 | |
48 | |
46 |