Forum Discussion
jananagarajan
3 years agoRegular Visitor
How to write a logical if statement for the index
How to write a logical if statement for the index Have written the same calculation in excel and would like to write the same in DAX IF(C3<>"",C3/$C$3,"") Sample Data is attached Custom...
- 3 years ago
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
It is for creating a new column.
Calculation CC = VAR _fixvalue = SUMX ( FILTER ( Data, Data[Customer ID] = "T03" && Data[Temp] = 27 ), Data[Value] ) VAR _result = DIVIDE ( Data[Value], _fixvalue ) RETURN IF ( _result > 1, BLANK (), FORMAT ( _result, "#0.0%" ) )
Jihwan_Kim
Super User
3 years agoHi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
It is for creating a new column.
Calculation CC =
VAR _fixvalue =
SUMX (
FILTER ( Data, Data[Customer ID] = "T03" && Data[Temp] = 27 ),
Data[Value]
)
VAR _result =
DIVIDE ( Data[Value], _fixvalue )
RETURN
IF ( _result > 1, BLANK (), FORMAT ( _result, "#0.0%" ) )
jananagarajan
3 years agoRegular Visitor
I am getting the result in text format not able to change and only 100% is getting displayed here.