Forum Discussion
Anonymous
7 years agoNot applicable
how to make column optional / selective
Hello, so I have a line graph. on the y-axis is a set of data set by a spesific unit. I would like to be able to switch from the current unit of data to a diffrent unit of data, is there a way to ...
- Anonymous7 years ago
Ok , so i figured it out! it was way more simple that what we were trying. I noticed you were using
VAR amount=sum(""Column"") to basicaly transfer a column, so i did thisBar/Line Value =VAR mAamount = SUM('BCI - id 1,3,6,7,8'[mA])VAR amount=SUM('BCI - id 1,3,6,7,8'[dBuA])returnIF(selectedvalue(Table1[Units]) ="dBuA", amount,IF(selectedvalue(Table1[Units]) ="mA" , mAamount,0))I created two columns one for each unit that calulated the number correctly. Then the code imports them depending on what is selected. Here are the two calculated columns::dBuA = IF((NOT('BCI - id 1,3,6,7,8'[Unit] = "dBuA")) , 20 * LOG10('BCI - id 1,3,6,7,8'[RequirementLevel]) + 60 ,'BCI - id 1,3,6,7,8'[RequirementLevel])mA = IF((NOT('BCI - id 1,3,6,7,8'[Unit] = "mA")), (POWER(10,(( 'BCI - id 1,3,6,7,8'[RequirementLevel] - 60)/20))),'BCI - id 1,3,6,7,8'[RequirementLevel])"front end" table to select what unit to display "back end" the tablethanks for the help , hope this explanation is not as confusing
ryan_mayu
Super User
7 years agoAnonymous
I am not sure I understand your scenario clearly.
I create a column to converse all the unit to one. For example, I choose dBua
dBuA = if(Sheet19[unit]="dBuA",Sheet19[requirement level],20*LOG('Sheet19'[requirement level])+60)
Then you just create a unit table which only has mA and eBuA in order to filter your data.
amount = sum(Sheet19[requirement level])
change = if(SELECTEDVALUE(Unit[Unit])="dBuA",[amount],POWER(10,(([amount]-60)/20)))
Anonymous
7 years agoNot applicable
Ok , so i figured it out! it was way more simple that what we were trying. I noticed you were using
VAR amount=sum(""Column"") to basicaly transfer a column, so i did this
Bar/Line Value =
VAR mAamount = SUM('BCI - id 1,3,6,7,8'[mA])
VAR amount=SUM('BCI - id 1,3,6,7,8'[dBuA])
return
IF(selectedvalue(Table1[Units]) ="dBuA", amount,
IF(selectedvalue(Table1[Units]) ="mA" , mAamount,0
))
I created two columns one for each unit that calulated the number correctly. Then the code imports them depending on what is selected. Here are the two calculated columns::
dBuA = IF((NOT('BCI - id 1,3,6,7,8'[Unit] = "dBuA")) , 20 * LOG10('BCI - id 1,3,6,7,8'[RequirementLevel]) + 60 ,
'BCI - id 1,3,6,7,8'[RequirementLevel])
mA = IF((NOT('BCI - id 1,3,6,7,8'[Unit] = "mA")), (POWER(10,(( 'BCI - id 1,3,6,7,8'[RequirementLevel] - 60)/20))),
'BCI - id 1,3,6,7,8'[RequirementLevel])
"front end" table to select what unit to display "back end" the table
thanks for the help , hope this explanation is not as confusing
- ryan_mayu7 years ago
Super User
Anonymous Glad to hear that. You are welcome.
- v-piga-msft7 years ago
Resident Rockstar
Hi Anonymous,
It seems that you have solved your problem, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
Best Regards,
Cherry