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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anwo_Maryam
Regular Visitor

undefined

  • 1724078652000173332739614243900.jpg

    My year(1996 and 1997) sum of gross sales are showing the same value as my total sum of sales on my power I table view.

  • How do I solve this problem in such way that sum of gross sales for year 1996 will be in the of 1996 and also the same thing for 1997???
4 REPLIES 4
Anonymous
Not applicable

Thanks for the reply from AmiraBedh , please allow me to provide another insight:
Hi  @Anwo_Maryam ,

 

Is [Sum of Gross Sales] a calculated column or a measure? If it is a measure, the measure follows the context of the ‘Total’ row and calculates within that context. Therefore, the measure used in the columns of the table visualization may have unexpected values in the ‘Total’ column.

You can try using the following measure:

Correct total =
var _table=SUMMARIZE(' AutoCalendar',' AutoCalendar'[Year],"Value",[Sum of Gross Sales])
return
IF(
    HASONEVALUE(' AutoCalendar'[Year]), [Sum of Gross Sales],SUMX(_table,[Value]))

According to the error message, if [Years] is a text type and [orderDate] is a date type, according to the design of power bi, the two different types can not be compared,, you can consider creating a [Year] in Fact Table to make a connection.

This is the related document, you can view this content:

Solved: cannot convert value of type text to type Date - Microsoft Fabric Community

Solved: Power BI Error - Cannot convert text into date typ... - Microsoft Fabric Community

 

Best Regards,

Liu Yang

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

AmiraBedh
Super User
Super User

Maybe there is no relationship between your fact table and your date table?

Can you share your model?


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

17240935410687397903392674919582.jpg

There

17240937051887370248140705003726.jpg

There's a relationship between my fact table and years.

17240938742053840250310292272119.jpg

This is also popping up anytime I choose years in my report view

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors
Top Kudoed Authors