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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
erhan_79
Post Prodigy
Post Prodigy

Dax Formula Help

Dear All ;

 

i need your supports about creating a columnB

 

İ have ColumnA  ;

 

When ColumnA is A ; Column B will be 10

When ColumnA is B ; Column B will be 5

When ColumnA is C ; Column B will be 7

 

C1.JPG

 

 

thanks in advance for your supports

 

 

1 ACCEPTED SOLUTION
themistoklis
Community Champion
Community Champion

@erhan_79

 

2 Options:

 

Column B = IF (COLUMNA= "A", 10, IF (COLUMNA= "B", 5, IF (COLUMNA= "C", 7, BLANK())))

 

Column B =
SWITCH (
    TRUE (),
    'Table'[Column A] = "A" , 10,
    'Table'[Column A] = "B" , 5,
    'Table'[Column A] = "C" , 7,
    BLANK()
)

 

View solution in original post

5 REPLIES 5
v-yulgu-msft
Employee
Employee

Hi @erhan_79,

 

This looks like an odd behavior. Please click the "refresh" button on the top ribbon to see if it works. Re-load the data table and re-create the calculated Column B for a test.

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

dear @v-yulgu-msft ;

 

as you remind , i tried it and noe it is working thanks for your supports

themistoklis
Community Champion
Community Champion

@erhan_79

 

2 Options:

 

Column B = IF (COLUMNA= "A", 10, IF (COLUMNA= "B", 5, IF (COLUMNA= "C", 7, BLANK())))

 

Column B =
SWITCH (
    TRUE (),
    'Table'[Column A] = "A" , 10,
    'Table'[Column A] = "B" , 5,
    'Table'[Column A] = "C" , 7,
    BLANK()
)

 

dear @themistoklis

 

thanks for your kind support  ; it seems work but i could not undersatnd that : after i created the column , cells seems empty but  when i come on the cell with mouse it shows with popup there is the value that i wanted , why it is like that , it is like there is value in the cell but not seem, also from filter i can filter too but again value is not seemed 

 

C2.JPG

 

 

 

 

@erhan_79

 

I find it very strange. This shouldnt be happeing.

 

Can you share the dataset with us? Maybe there is an extra space in the raw data....

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.