The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi
Can anyone help me with the following;
Measure =
IF (
AND (
CONTAINS (
'table1',
'table1'[FID_Custom], "TRUE"
),
CALCULATE (
CONTAINS (
'table1',
'table1'[Status], "Validated"
)
)
),
1,
0
)
=> I want to get all rows with 'table1'[FID_Custom]"TRUE" and 'table1'[Status] "Valiated" => currently I get only the "TRUE" once.
It is a IF condition with multiple selections.
Many thanks
Solved! Go to Solution.
Hi @tomkribi
Try
Measure =
CALCULATE (
COUNT ( 'table1'[FID_Custom] ),
'table1'[FID_Custom] = TRUE (),
'table1'[Status] = "Validated"
)
if FID_Custom is of Boolean type. Or:
Measure =
CALCULATE (
COUNT ( 'table1'[FID_Custom] ),
'table1'[FID_Custom] = "TRUE",
'table1'[Status] = "Validated"
)
if FID_Custom is of text type.
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Great, many thanks, this is the solution for me
Measure = CALCULATE ( COUNT ( 'table1'[FID_Custom] ), 'table1'[FID_Custom] = "TRUE", 'table1'[Status] = "Validated" )
Hi @tomkribi
Try
Measure =
CALCULATE (
COUNT ( 'table1'[FID_Custom] ),
'table1'[FID_Custom] = TRUE (),
'table1'[Status] = "Validated"
)
if FID_Custom is of Boolean type. Or:
Measure =
CALCULATE (
COUNT ( 'table1'[FID_Custom] ),
'table1'[FID_Custom] = "TRUE",
'table1'[Status] = "Validated"
)
if FID_Custom is of text type.
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Great, many thanks, this is the solution for me
Measure = CALCULATE ( COUNT ( 'table1'[FID_Custom] ), 'table1'[FID_Custom] = "TRUE", 'table1'[Status] = "Validated" )
Hi @tomkribi ,
There is a simpler way of writing your IF statement: (Create a caluclated column)
calcColumn = IF('table1'[FID_Custom] = "TRUE" && 'table1'[Status] = "Valiated", 1, 0)
If this doesn't help post some sample data and desired output.
Thanks,
Pragati
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
10 | |
10 | |
10 | |
9 |