Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have 3 tables as follows:
TABLE DATE
DATE |
1/1/2020 |
2/1/2020 |
3/1/2020 |
..... |
..... |
TABLE VOLUMES
DATE | VOLUMES |
1/1/2020 | 10 |
2/1/2020 | 15 |
3/1/2020 | 50 |
... | ... |
... | ... |
TABLE COSTS
DATE | COST | VOLUMES YTD (calculated colum) |
1/1/2020 | 10 | 75 |
2/1/2020 | 15 | 75 |
3/1/2020 | 50 | 75 |
... | ... | |
... | ... |
They have 1:many relation from table Date to both tables Costs and Volumes.
I need to add a calculated column in table COSTS, named Volumes YTD, containing the sum ytd of volumes for a selected period.
Example: if the user wanted to read the volumes ytd from Jan to March, the result would be 75 (in red in the example above) for any row. Besides, I'd like the user to be able to select the ytd period to be considered, meaning that if the user selects February YTD, then the table COST appears as follows:
DATE | COST | VOLUMES YTD (calculated column) |
1/1/2020 | 10 | 25 |
2/1/2020 | 15 | 25 |
3/1/2020 | 50 | 25 |
... | ... | |
... | ... |
Many thanks
Mark
As far as I am aware calculated columns are "calculated" when the model is built.
So the unless the user is rebuilding the model with some kind of parameter table you can't do what you are describing.
Depending on what you are trying to do maybe a measure is a better way to go?
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
7 |