Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am getting the same results in every row while calculating the TotalYTD in powerBI. I have a fact table and dimensional date table. My DAX formula is very simple as TotalYTD(sum(FactTable(sales), DimDate(Date)). it gives the same result in every row when use the fields from DimDate table and also fills the empty rows with same results. Your help will be highly appreciated.
Solved! Go to Solution.
Hi @Anonymous
Try this measure:
Measure YTD =
CALCULATE (
SUM ( Actuals[Actual] ),
FILTER (
ALL ( DateTable ),
DateTable[DayOfWeek] <= MAX ( DateTable[DayOfWeek] )
)
)
Output:
Link to download updated file: https://gofile.io/d/ClzBtt
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Thanks community, the DAX function in fine and working now. i have been pulling my hair since yesterday to solve this simple puzzle but it is fixed now. i do not know what was happened. the same formula started working automatically giving the correct results. i had no idea what was happened.
@Anonymous Can you please share screenshot of your model?
It appears that your model is not set up correctly which could be causing issues.
1. Check if there is an "Active" relationship between the tables.
2. Also, this thing might not make much difference but could you please go into your data model and right click on the dat table and click on. - mark as date table and choose the date column. Sometimes when date table is not marked as a date table then there are some issues in time intelligence functions.
3. Please share a screenshot of date table as well as the other table so that the fields in it are visible to understand better.
4. Please share a screenshot of your model.
Thanks
Radhika
It is the data model i am using. it gives me the same result in every field.
i am trying to use the following DAX function and getting the same results in every field
Hi,
Remove the DateTable[DayofWeek]=2 input from your measure.
Thanks @Ashish_Mathur for being here again. i removed that filter but now it is giving me the yTD results in every field. i wonder why is that giving me same value in every field. also i am learing and trying to get the YTD sale for all 2nd day of week which gives me a specific value agianst every record as i have shared in image.
Hi,
I am totally confused now. Share the link from where i can download your PBI file and show the expected result very clearly.
Hi @Anonymous
Try this measure:
Measure YTD =
CALCULATE (
SUM ( Actuals[Actual] ),
FILTER (
ALL ( DateTable ),
DateTable[DayOfWeek] <= MAX ( DateTable[DayOfWeek] )
)
)
Output:
Link to download updated file: https://gofile.io/d/ClzBtt
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Please do not re-invent the wheel. There are so many excellent resources that teach all there is to know about how to properly build models and calculations... Here's one that I've found within several seconds: https://youtu.be/zYIxukD2KCM
Hi @Anonymous
Could you please share a snapshot from your report here (scrrenshot from able you used that measure)? Or share your desktop version file with (*.pbix) format on gofile.io and send a link here
Appreciate your Kudos !!
Hi,
There should be a relationship (Many to One and Single) from the Date column of your FactTable to the Date column of the DimDate table. To your visual, drag the Year/Month/Date from the DimDate table.
Thaks for your reply. yes there is a one to many relation between dimdate table and fact table. i can also see this in my model but do not know why does it give the wrong calculation or the same in every row.
Share the link from where i can download your PBI file.
Please use this link. i am a new BI suer so do not know enough.
Thanks for getting me back again
Hi,
That link takes me to a sign-in page. Share the link from where i can download your PBI file.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.