The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
I'm trying to calculate Avg/day/store but, my number are not coming out correctly. Is anything wrong with my DAX.
Solved! Go to Solution.
Hi @Anonymous ,
Please refer this measure:
Measure =
AVERAGEX ( ALLEXCEPT ( 'dim', 'dim'[store] ), [units sold] ) / 7
If it doesn't work, please share some sample data.
Best Regards,
Jay
Hi @Anonymous ,
Please refer this measure:
Measure =
AVERAGEX ( ALLEXCEPT ( 'dim', 'dim'[store] ), [units sold] ) / 7
If it doesn't work, please share some sample data.
Best Regards,
Jay
Hi @Anonymous
You've given too little context to answer this question. And the DAX is not correctly formatted, hence hard to read. No idea why you'd like to add Dim[Store] as a filter to CALCULATE. CALCULATE only takes tables as filters, not columns. But you could try this:
Avg Per Day =
averagex(
values( 'Date'[calendar_date] ),
[Units Sold] / 7 -- why divide by 7?
)
If you slice by Store, this should give you what you want in the current context. I also understand that [Units Sold] is a measure...
@daXtreme I'm trying to calculcate Avg per day per store. Then Week Number on the column.
I'don't want the store slicer. it works with the store slicer.
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |