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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Conditionally Negative Numbers Based on Another Table

Hi everyone!

 

I have a column with prices, and another column and another table with the acronyms C and D. That are Credit or Debit.

Tables are linked by a unique ID between them.

I need to turn prices to negative, when the acronym is D.

I am using SQL Server Analysis Services Tabular, how could I do this with DAX?

 

SSAS Problem.png

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

Hi ralsouza,

 

Create a calculate column in table Toyota - Valores using DAX below:

Conditional Prices =
IF (
    RELATED ( 'Toyota - Lancamentos'[tipolancto] ) = "D",
    - [Valor Toyota],
    [Valor Toyota]
)

Regards,

Jimmy Tao

 

View solution in original post

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi ralsouza,

 

Create a calculate column in table Toyota - Valores using DAX below:

Conditional Prices =
IF (
    RELATED ( 'Toyota - Lancamentos'[tipolancto] ) = "D",
    - [Valor Toyota],
    [Valor Toyota]
)

Regards,

Jimmy Tao

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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
Top Kudoed Authors