Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi Team,
I need to create a measure based on the client code. If the client code is A, then meausre=divide (sum(Table1[Charge] of A) , sum(Table2[Units] of A)). Can I please know how to achieve this requirement?
Thanks
DA
Solved! Go to Solution.
Your not giving a lot of context here, but should be something similiar to the following...
MyMeasure=
VAR chargeValue = SUMX(FILTER(ALLSELECTED(Table1),Table1[Charge] = "A"), FieldToBeSum)
VAR UnitValue = SUMX(FILTER(ALLSELECTED(Table2),Table2[Units] = "A"), FieldToBeSum)
RETURN DIVIDE(chargeValue ,UnitValue ,0)
Thanks @BrianConnelly Is there any other way to achieve this if the value of A is dynamic?
If you have a slicer to choose the dynamic value then add another variable...
MyMeasure=
VAR dynamicValue = SELECTEDVALUE(DyanmicFieldName, DefaultValue(e.g. "A"))
VAR chargeValue = SUMX(FILTER(ALLSELECTED(Table1),Table1[Charge] = dynamicValue ), FieldToBeSum)
VAR UnitValue = SUMX(FILTER(ALLSELECTED(Table2),Table2[Units] = dynamicValue ), FieldToBeSum)
RETURN DIVIDE(chargeValue ,UnitValue ,0)
Your not giving a lot of context here, but should be something similiar to the following...
MyMeasure=
VAR chargeValue = SUMX(FILTER(ALLSELECTED(Table1),Table1[Charge] = "A"), FieldToBeSum)
VAR UnitValue = SUMX(FILTER(ALLSELECTED(Table2),Table2[Units] = "A"), FieldToBeSum)
RETURN DIVIDE(chargeValue ,UnitValue ,0)
User | Count |
---|---|
13 | |
8 | |
8 | |
7 | |
5 |
User | Count |
---|---|
23 | |
15 | |
15 | |
10 | |
7 |