Forum Discussion
Measure for Calculatng Revenue
- 6 years ago
Hi vjnvinod ,
You are correct I included every values in the calculation change the var to the following:
var Delivery_Revenue = CALCULATE(SUM('Table'[TER_FYTD_USD]),filter(ALL('Table'[DeliveryRegion],'Table'[HQRegion]),'Table'[DeliveryRegion] = SELECTEDVALUE('Table 2'[HQRegion]) && 'Table'[HQRegion]<> SELECTEDVALUE('Table 2'[HQRegion]))))Should give expected result if not please tell me.
thanks for this, i evaluted this with my bigger dataset and numbers are not what i am expecting.
your measure is basically adding HQ and Delivery revenue instead of HQ and Inbound Revenue
for instance my take a look at US-East, my revenue should have been =456+5=461M
your measure is resulting into 774M(ie because you are taking the whole delivery region)
i have indicated, as green arrow, how the Inbound revenue will have to be calculate(filter for Deliver region- US-East and also filter for all HQ region except US-East
Hi vjnvinod ,
You are correct I included every values in the calculation change the var to the following:
var Delivery_Revenue = CALCULATE(SUM('Table'[TER_FYTD_USD]),filter(ALL('Table'[DeliveryRegion],'Table'[HQRegion]),'Table'[DeliveryRegion] = SELECTEDVALUE('Table 2'[HQRegion]) && 'Table'[HQRegion]<> SELECTEDVALUE('Table 2'[HQRegion]))))
Should give expected result if not please tell me.
- MFelix6 years ago
Super User
Hi vjnvinod ,
The separate table is only for slicer or categorization of the Revenue value purposes not anything else, you can then calculate based on any field using the same logic.
If you use the slicers from the same table you will not be abble to select the values in a slicer in an independent way from the table because you are creating subsets or using the full table.
So you shoud be abble to create the report normally except if you are using this revenue measure all other stays the same.
- MFelix6 years ago
Super User
Hi vjnvinod ,
Measure are based on context meaning that the calculation is based on the values you place in filters, slicers, tables, visualizations and so on.
When you are calculating the measure of the revenue if you add more columns like account the calculations will be remade in order to achieve the desired output, so no need to make new queries just for the account level.
As I refered the table created for the slicer is only to give context if you look at the coding I'm comparing the value in the slicer with the values in the HQ and Delivery region so since HQ and Delivery region are related with the accounts, if you place the accounts on a visualization the result will appear correctly.
If I'm not explaining my self clearly can you provide an example with data and expected output so I can see what is working or not?
- vjnvinod6 years ago
Impactful Individual
this is awesome,
is there anyway this could be included within the data itself?
instead of seprate table for region?
because right now i have only Region and total revenue, i need all the other coloumns from the table 1, so that i can create a dashboard with various other fields as well
- vjnvinod6 years ago
Impactful Individual
how would i even know, which accounts are contributing to the revenue we measured in the "Table2?
and also if its possible
in that case the only way i can use the table is to have multiple queries built and post that appending each queries to get a master database?
like i was trying to do that in the first thread?
- vjnvinod6 years ago
Impactful Individual
thanks Felix for clarifying
what i am trying to do is
creating a scatter plot visual and a drill through functionality in the scatter plot which will allow users to see which are the account contributing to the revenue we have calculated using that table 2
see below an example i created when with the first table but i was not able to calculate the Actual revenue(which you have claculated using some DAX)
let me know if this is possible, can you share pbix showing this? many thanks
- v-kelly-msft6 years ago
Community Support
Hi vjnvinod,
Yes, in scatter chart you can use calculated column for plot,just use the dax expression and put it in the Y-axis filed.
Best Regards,
KellyDid I answer your question? Mark my post as a solution! - vjnvinod6 years ago
Impactful Individual
Can you share the pbix?
what i am trying to do is to create scatter plot and then using a drill through, which can give me the account details relation to those regions
as Felix has calcualted the Revenue, but i am trying to find a way to get account details as well