Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
msarfaraz
Frequent Visitor

dax

 dax.JPG

 

if Night column is - value , Nights x Rooms = 0, if Night column is + value than Night * rooms = Answer

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @msarfaraz,

First of all please elaborate your questions better otherwise pleople will not be abble to help you.

Read this https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 to help you along.

Don't know if you want a measure or a column but the formula should be something like this

Night rooms =
IF (
SUM ( Table[Nights] ) < 0,
0,
SUM ( Table[Nights] ) * SUM ( Table[Rooms] )
)

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @msarfaraz,

Please share your sample table and list expected result as @MFelix suggested. And you can create dummy sample table if your data is confidential.

Best Regards,
Angelia

View solution in original post

3 REPLIES 3
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @msarfaraz,

Have you resolved your issue? If you have, please mark the helpful reply as answer, more people will benefit from here.

Thanks,
Angelia

v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @msarfaraz,

Please share your sample table and list expected result as @MFelix suggested. And you can create dummy sample table if your data is confidential.

Best Regards,
Angelia

MFelix
Super User
Super User

Hi @msarfaraz,

First of all please elaborate your questions better otherwise pleople will not be abble to help you.

Read this https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 to help you along.

Don't know if you want a measure or a column but the formula should be something like this

Night rooms =
IF (
SUM ( Table[Nights] ) < 0,
0,
SUM ( Table[Nights] ) * SUM ( Table[Rooms] )
)

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors