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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Vedvati
Frequent Visitor

Calculate Gross Sales for 4-5 sites and show it in clustered bar chart

Hello,

I am new to Power BI.

I have written function to get the data from multiple tables in SQL.

Now I want to calculate Gross sales for 4-5 sites for This year and Past year and show that in clustered bar chart.

X-axis -> Sites Names

Value -> Gross Sales

Legend -> Year

This is what I am thinking of.

How can I achive that?

Kindly let me know if any other work around is there.

Thank you.

2 ACCEPTED SOLUTIONS
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Vedvati ,

Based on your dedcription, I still have a little confused about your scenario.

If it is convenient, could you share the data sample which could reproduce the scenario and your desired output so that we could help further on it.

Please refer to this article about how to get your question answered quickly.

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
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

Hi @Vedvati ,

Normally,if we want to get the date you selected in slicer, you could use  SELECTEDVALUE with DAX.

If you have the date between slicer, you could use MAX and MIN function to get the date range in between slicer.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
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-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Vedvati ,

Based on your dedcription, I still have a little confused about your scenario.

If it is convenient, could you share the data sample which could reproduce the scenario and your desired output so that we could help further on it.

Please refer to this article about how to get your question answered quickly.

Best Regards,

Cherry

 

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

Hello,

 

Could you just help me out on this:

 

I have a slicer to select Date Range. I want to show data from previous year for same date range.

So how to get the selected dates in DAX?

 

Thank you in advance.

Hi @Vedvati ,

Normally,if we want to get the date you selected in slicer, you could use  SELECTEDVALUE with DAX.

If you have the date between slicer, you could use MAX and MIN function to get the date range in between slicer.

Best  Regards,

Cherry

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.