Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Analitika
Post Prodigy
Post Prodigy

Visual doesn't correspond to table data in Power BI

Hello,

 

I am creating a line chart in Power BI but values in line chart don't correspond to table data. Why it happens?

I am calculatince cumulative sum.

Analitika_0-1654234954880.png

That values are different than in Operacine veikla row per month and total.

I used this formula for counting:

CF operacinis CF kaupimas daugiau nei Y =
CALCULATE ([CF operacinis CF],
FILTER (ALLSELECTED('Date'[Date]),
'Date'[Date] <= MAX ( 'Date'[Date] ))
)
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi  @Analitika,

Did you create any relationship between the table Data and fact table? Please try to update the formula of your measure [CF operacinis CF kaupimas daugiau nei Y] as below and check whether it can return the correct result.

CF operacinis CF kaupimas daugiau nei Y =
CALCULATE (
    [CF operacinis CF],
    FILTER ( ALLSELECTED ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] )
)

In addition, you can refer the following links to resolve your problem.

Calculating Cumulative Totals for Time Periods

Cumulative Totals Only Up To Specific Dates - DAX Tutorial For Power BI

yingyinr_0-1654676010748.png

yingyinr_2-1654676131790.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi  @Analitika,

Did you create any relationship between the table Data and fact table? Please try to update the formula of your measure [CF operacinis CF kaupimas daugiau nei Y] as below and check whether it can return the correct result.

CF operacinis CF kaupimas daugiau nei Y =
CALCULATE (
    [CF operacinis CF],
    FILTER ( ALLSELECTED ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] )
)

In addition, you can refer the following links to resolve your problem.

Calculating Cumulative Totals for Time Periods

Cumulative Totals Only Up To Specific Dates - DAX Tutorial For Power BI

yingyinr_0-1654676010748.png

yingyinr_2-1654676131790.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hi,

Ensure you have a Calendar Table.  Create a relationship (Many to One and Single) from the Date column of your Table to the Date column of the Calendar Table.  Write calculated column formulas in the Calendar Table to extract Year, Month name and Month number.  To your visual/filter drag Year and Month Name from the Calendar Table.  Write this measure

CF operacinis CF kaupimas daugiau nei Y = calculate([CF operacinis CF],datesytd(Calendar[Date],"31/12"))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.