Filter Values in DAX

ahmedismailfourtex

Board Regular
Joined
Apr 28, 2015
Messages
124
Hello,
I have sales table contain product name, quantity and date.
- first how to get total quantity of sales for each product among all period in calculating column ?
- second I am using Power BI and i need to present products sales by sales group and period (I will classify them to groups according to sales amount and period is in last 12 month or 24, I will using both as a slicers)
BR:confused::eeek:
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
- first how to get total quantity of sales for each product among all period in calculating column ?

You shouldn't do that. Please read my post about that here Calculated Columns vs Measures in DAX - Excelerator BI

Instead write a measure (not a calc column) like this.

=CALCULATE(SUM(Sales[Quantity]),ALL(Sales))

For the second, it would help if you posted a sample workbook. It sounds like a banding solution may work for you. Read about that here
Banding in DAX - Excelerator BI
 
Upvote 0
Thank you Matt for advice,
my data seems like

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Product Name[/TD]
[TD]Quantity[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]X[/TD]
[TD]10[/TD]
[TD]1/1/2016[/TD]
[/TR]
[TR]
[TD]Y[/TD]
[TD]20[/TD]
[TD]10/1/2015[/TD]
[/TR]
[TR]
[TD]z[/TD]
[TD]10[/TD]
[TD]20/1/2016[/TD]
[/TR]
[TR]
[TD]x[/TD]
[TD]15[/TD]
[TD]25/1/2015[/TD]
[/TR]
</tbody>[/TABLE]

I need to plot pie chart with sales quantity groups (>15,>10,<10), then I need to create a slicer with the period (2016,2015) and interact with booth (pie chart and slicer) in the same time.
thank you again and best regards.
 
Upvote 0

Forum statistics

Threads
1,224,163
Messages
6,176,812
Members
452,744
Latest member
Alleo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top