Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, I want to calculate the sales/square meter for the past 12 months. But i need to edit two measures that talk each other.
I wrote this function to calculate the sales for the last 12 months, and it works:
I have a Sold/Square meter measure, which is written like this and takes into account ONLY the days worked out of 365
Sold/MQ 365 =
CALCULATE( [Sold] / 365*365/[Sold Area],
FILTER( VALUES( ANCLI[Sales Point ID] ), [Sales Area] > 0&&[Sold]<>BLANK()))
But writing [Sold]/365, it's wrong because i want ONLY the days on which a store has sold
But how do I modify this last one so that it takes into account ONLY the days on which a store has sold?
Basically i want this replicate this formulaSolved! Go to Solution.
Hi, thank you but i got the solution by my self.
First i calculated working days so:
Hi, thank you but i got the solution by my self.
First i calculated working days so:
@Anonymous - In order to get an exact answer you need to post more about your model or some sample data.
But, to provide some help that maybe you can use. creating a measure / variable that's something along the lines of:
CALCULATE( DISTINCTCOUNT( 'Table'[Date Column] ), Filter( Table, [Sales] > 0 )
This would then replace 365.
If this helps or works, please accept as the solution.
@Anonymous - did this work? If yes, it would be great if you can mark it as the solution for ohters visibility!
Thanks!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 5 | |
| 5 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 10 | |
| 10 | |
| 6 | |
| 6 |