Forum Discussion
Producing a total from a measure - Daily Occupancy
- Anonymous2 years ago
Thanks for the reply from Greg_Deckler , please allow me to provide another insight:
Hi FlankyPank2___ ,Here are the steps you can follow:
1. You might consider joining the relationship between the two tables. when the slicer is selected. which affects Building. based on [Start Date].
2. Create measure.
Measure = var _select=SELECTEDVALUE('Table'[Building]) var _table= SELECTCOLUMNS('Date23-24',"Date",[Date23-24]) var _table2= CROSSJOIN( 'Table',_table) return COUNTX( FILTER( _table2,[Date]>=[Start Date]&&[Date]<=[End Date]&&[Building]=_select),[Name])3. Result:
There is a question as to how the "total is 12" is calculated, because when I add 4+5+4 it is 13.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- 2 years ago
Creating a relationship skewed my chart which plots daily occupancy.
But, the measure seems to work without creating the relationship. I've done some checking and it looks to be accurate but i'm going to check again when it's less Monday Morning!
Thank you so much for your time. (& yes my Math is rubbish, it was 13!) Thanks again
Thanks for your reply.
I'm not sure this is quite what I'm after? I think its how my two tables are able to interact with each other? But I will take time and look into your recommendations and see if it does apply.
Thanks
FlankyPank2___ I think you are correct. I believe you actually need this one:
- FlankyPank2___2 years agoHelper I
Thank you for this. The answer from v-yan seemed to work but this is also very useful and i'll be trying it out. Thank you