I’m trying to create a mesure with a condition but I’m failed. It seems very simple at first but it is not !!
Amount calculated is If status is R then Store AmountĀ Else Amount
Thanks in advance
—————————— Boby
——————————
colin mcilwain
Member
July 2, 2020 at 3:53 AM
Hi ,
try this.
Amount Calculated =
var __Store=SELECTEDVALUE('Table'[Store])
var __Status=SELECTEDVALUE('Table'[Status])
var __Tot_R=calculate(sumx(ALLSELECTED('Table'),[Amount]),'Table'[Store]=__Store)
var __Tot_T=sum('Table'[Amount])returnif(__Status="R",__Tot_R,__Tot_T)?
?
Colin.
—————————— colin mcilwain Lead Process Specialist —————————— ——————————————-
Robert NGUYEN
Member
July 2, 2020 at 4:45 AM
Hi Colin,
Which table i have to put here ?
ALLSELECTED('Table')?
Thank you
—————————— Boby —————————— ——————————————-
colin mcilwain
Member
July 2, 2020 at 5:13 AM
Hi , replace ‘Table’ with the name of your table.
Amount Calculated =
var __Store=SELECTEDVALUE('MyTableName'[Store])
var __Status=SELECTEDVALUE('MyTableName'[Status])
var __Tot_R=calculate(sumx(ALLSELECTED('MyTableName'),[Amount]),'MyTableName'[Store]=__Store)
var __Tot_T=sum('MyTableName'[Amount])returnif(__Status="R",__Tot_R,__Tot_T)
Colin.?
—————————— colin mcilwain Lead Process Specialist —————————— ——————————————-
Robert NGUYEN
Member
July 2, 2020 at 5:52 AM
Hi Colin,
each colum of my table is a tablename distinct : Store is store Name is User Status is User Amount is revenue amount calculated is a mesure of Amount.
My formula : amount]calculated = var __Store = SELECTEDVALUE(Store[StoreName]) var __Status = SELECTEDVALUE(User[Status]) var __Tot_R = calculate(sumx(ALLSELECTED(User), [total amount] ),Store[StoreName]= __Store) var __Tot_T = [total amount] return if (__Status =”R”, __Tot_R, __Tot_T)
Please note:
This action will also remove this member from your connections and send a report to the site admin.
Please allow a few minutes for this process to complete.
Report
You have already reported this .
Welcome to our new site!
Here you will find a wealth of information created for peopleĀ that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!