Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Calculation shows filtered lines

Hi,

 

I have some different data which I all connected to each other with relationships. I want to show data of only the last 3 days on my dashboard.

 

Data1:

Date

Date

01/01/2008
02/01/2008

 

Data2:

Quality

QualityDateTime
Xt219 august 202323:59:53
Xt219 august 202323:59:33
Xt219 august 202323:59:13

 

Data3:

Performance

PerformanceDateTime
122319 august 202304:00:00
121119 august 202312:00:00
111119 august 202320:00:00

 

Data4:

Guidelines

ProductNeeded performance each day
Xt24.2
Xt33.3
Xt45.0

 

I made calculation: 

Guide performance = SUM('Guidelines'[Needed performance each day])/3*1000 to see it in KG's instead of tonnes
 
I made a table in PowerBi:
DateTimeQualityPerformanceGuide Performance
19/08/202304:00:00Xt212231400
19/08/202312:00:00Xt212111400

 

When I add the 'Guide Performance' field it seems it shows all the lines in 'Performance' from history till now instead of only the last 3 days. If I remove 'Guide Performance' it shows only the last 3 days. What am I doing wrong?

 

Martijn

5 Replies

  • Hello Anonymous, because you have multiple tables it would be useful if you can share *.pbix file with the created data model and some sample data.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Sergii24, unfortunately that won't be possible as it's both company data and also live data received by an API from a procescontrol-system. I wouldn't be able to add that data even if I wanted too

  • ERD's avatar
    ERD
    Community Champion

    Anonymous , you either need to filter dates on your visual, or include this filtering in your formulas.