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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anik
Helper I
Helper I

total sales in different years

Capture.PNGCapture.PNG

 In the DateKey sales table, this is the only column related to date and year. I converted it to year. The years range from 2006-2008. I want to calculate sales by years.  For example, total sales in 2006, 07, and 08 in Asia, Europe and NA. I tried to write DAX measures but my formula is not working. Could you please help me? 

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

In that case you can convert it to list from the drop down in the top right corner of slicer as shown below :-

Samarth_18_0-1628855618290.png

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

9 REPLIES 9
Samarth_18
Community Champion
Community Champion

Hi @Anik ,

 

Can you try to add sales data from your "FactOnlineSales" table and Dates from Date table in your table visual.

Now use Date from date table as slicer. It will help you to get desired output.

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Hi Samarth, I tried everything what I know. But nothing is working. could you please have a try? I have shared my file. https://drive.google.com/file/d/1ooJUMY1ZIUyUdSMDKBhnScrSBRTh5Hyg/view?usp=sharing 

Samarth_18
Community Champion
Community Champion

Hi @Anik 

 

Is this output do you need?

Samarth_18_0-1628845920997.png

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Hey, you've made a range slide. It's a good try 🙂. I want a slicer/table contains 2006, 2007, and 08. I want to click any specific year and it will show total sales of that year. I dont know why it is so complex to me 😪 

Samarth_18
Community Champion
Community Champion

In that case you can convert it to list from the drop down in the top right corner of slicer as shown below :-

Samarth_18_0-1628855618290.png

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Samarth, thank you so much. It worked finally. There's a column in the Dimdate table called fiscalyear that I missed. I knew you can solve it 🙂.   

Anik
Helper I
Helper I

Hello,
1. Yes, I have a Date table. This is the picture of the table datetable.PNG
2.  sales_07 = SUM(FILTER(FactOnlineSales, RELATED(DimDate[Datekey]) = 2007),FactOnlineSales[SalesAmount]) -- this measure is for specific year, 2007. but I want to filter all the years togather. Nothing is working. 

It seems weirs to me to have year as the datekey in the date table. Is their a relathionship between your sales table and th date table?

If yes on what column?

Kucrapok
Helper I
Helper I

Hello

1) Do you have a Date table?

2) Give us the Dax measure you tried

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors