Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a table 'Blad1':
MPC | Unit | day | CostPrice |
1084 | STK | 20211010 | 0.39 |
1180 | STK | 20211010 | 0.06 |
1220 | NET | 20211010 | 1.65 |
1084 | 1084 | 20210922 | 0.34 |
1180 | 1180 | 20210922 | 0.06 |
1220 | 1220 | 20210922 | 1.65 |
1084 | 1084 | 20210901 | 0.30 |
1180 | 1180 | 20210901 | 0.07 |
1220 | 1220 | 20210901 | 1.65 |
Then I devrived two tables from is which I will use as filters in order to dynamically compare two periods:
MPC | Unit | CurrentCostPrice | PreviousCostPrice |
1084 | STK | 0.39 | 0.30 |
1180 | STK | 0.06 | 0.07 |
1220 | NET | 1.65 | 1.65 |
Solved! Go to Solution.
Hi @BBart
Calculated tables are populated when they are created or when you refresh the whole model. They cannot be dynamically changed by slicers or filters according to user interactions. To achieve your expected result, you need to create measures which can be affected by slicers and use a table visual to show their value in the report.
Create measures
CurrentCostPrice =
VAR CurrentDate = SELECTEDVALUE(Date1[day],MAX(Date1[day]))
RETURN
CALCULATE(AVERAGE(Blad1[CostPrice]),ALL(Blad1[day]),Blad1[day] = CurrentDate)
PreviousCostPrice =
VAR PreviousDate = SELECTEDVALUE(Date2[day],MAX(Date2[day]))
RETURN
CALCULATE(AVERAGE(Blad1[CostPrice]),ALL(Blad1[day]), Blad1[day] = PreviousDate)
You can download the attachment to see details.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @BBart
Calculated tables are populated when they are created or when you refresh the whole model. They cannot be dynamically changed by slicers or filters according to user interactions. To achieve your expected result, you need to create measures which can be affected by slicers and use a table visual to show their value in the report.
Create measures
CurrentCostPrice =
VAR CurrentDate = SELECTEDVALUE(Date1[day],MAX(Date1[day]))
RETURN
CALCULATE(AVERAGE(Blad1[CostPrice]),ALL(Blad1[day]),Blad1[day] = CurrentDate)
PreviousCostPrice =
VAR PreviousDate = SELECTEDVALUE(Date2[day],MAX(Date2[day]))
RETURN
CALCULATE(AVERAGE(Blad1[CostPrice]),ALL(Blad1[day]), Blad1[day] = PreviousDate)
You can download the attachment to see details.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
@Greg_Deckler Sorry, I forgot to @ you :). I adjusted my questions and provided sample data and my expected outcome..
@BBart Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Hi Greg,
I added some details. Hope this helps 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
8 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
8 |