Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi All,
Could you provide some inputs in writing a dax function for below scenario.
Case
when (table1[column1] = 1 and table2[column1] = 1) then 1
when (table1[column1] = 1 and table2[column1] = 0) then 0
when (table1[column1] = 0 and table2[column1] = 1) then 0
when (table1[column1] = 0 and table2[column1] = 0) then 1
end
there is join between TABLE1 and TABLE2 defined in datamodel.
Thanks
Solved! Go to Solution.
Hi @revansh,
If you share some detail contents, it will be help to clarify your scenario.
If you already cross join or use related function to merge these columns to one table, you can try to use below formula to create a calculate column to return the result.
Result=if([T1 Column1]-[T2 Column1]=0,1,0)
Regards,
Xiaoxin Sheng
Hi @revansh,
If you share some detail contents, it will be help to clarify your scenario.
If you already cross join or use related function to merge these columns to one table, you can try to use below formula to create a calculate column to return the result.
Result=if([T1 Column1]-[T2 Column1]=0,1,0)
Regards,
Xiaoxin Sheng
I would simplify the case statement for DAX purposes. Your case statement returns 1 if either both columns are 1 or both are 0; otherwise, it returns 0.
Two questions:
Three possibilities:
YourColumnName = INT ( table1[column1] = RELATED ( table2[column1] ) )
YourColumnName = INT ( table2[column1] = RELATED ( table1[column1] ) )
YourMeasureName = INT ( SELECTEDVALUE ( table1[column1] ) = SELECTEDVALUE ( table2[column1] ) )
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
84 | |
83 | |
64 | |
61 | |
55 |
User | Count |
---|---|
171 | |
109 | |
105 | |
73 | |
71 |