Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I have three columns
Column A
Column B
Column C
I would like to create a IF Formula with the following statements:
IF(Query1[Column B] < 40 = Query1[ColumnA]
IF Query1[Column B] > 40 = 40
IF Column C = "PAN" = 45
How can I create that as a measure?
Solved! Go to Solution.
Hi @aishak12
For measure:
IF (
SELECTEDVALUE ( 'Table'[Column C] ) = "PAN", 45 ,
IF ( SUM ( 'Table'[Column B] ) < 40, SUM ( 'Table'[Coulumn A] ), 40 )
)
For calcualte colum:
IF ( [Column C] = "PAN", 45, IF ( [Column B] < 40, [ColumnA], 40 ) )
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @aishak12
For measure:
IF (
SELECTEDVALUE ( 'Table'[Column C] ) = "PAN", 45 ,
IF ( SUM ( 'Table'[Column B] ) < 40, SUM ( 'Table'[Coulumn A] ), 40 )
)
For calcualte colum:
IF ( [Column C] = "PAN", 45, IF ( [Column B] < 40, [ColumnA], 40 ) )
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@aishak12 , Try like
Sumx(Query1,
Switch(True() ,
Query1[Column B] < 40 ,Query1[ColumnA],
Query1[Column B] > 40 , 40,
Query1[Column C] = "PAN" , 45
))
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!