0% found this document useful (0 votes)
1K views2 pages

Power BI DAX Formulas

The document contains definitions for several metrics and calculations used to analyze store performance, including: 1) Average cases per store, total average cases across all stores, and total cases. 2) Percentage of grand total, average cases per month, and total average sales. 3) Top performing stores by average cases, and average cases for top stores. 4) Top stores sample that filters for top stores by average cases. 5) Percentage average cases for top stores filter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views2 pages

Power BI DAX Formulas

The document contains definitions for several metrics and calculations used to analyze store performance, including: 1) Average cases per store, total average cases across all stores, and total cases. 2) Percentage of grand total, average cases per month, and total average sales. 3) Top performing stores by average cases, and average cases for top stores. 4) Top stores sample that filters for top stores by average cases. 5) Percentage average cases for top stores filter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

Avg.

CS = AVERAGEX(VALUES('PG MPO'[PeriodName]),[Total Cases])

===
Ave CS (summed Total of ave cs) =
SUMX(VALUES('PG MPO'[STORE NAME]),
CALCULATE(AVERAGEX(VALUES('PG MPO'[PeriodName]),[Total Cases])))

===
Total Cases = Sum('PG MPO'[Volume (CASES)])

===

% of Grand Total =
DIVIDE (
SUM ( Table1[Sales] ),
CALCULATE ( SUM ( 'Table1'[Sales] ), ALL ( 'Table1'[Customer Name] ) )
)

===

% Ave CS =
DIVIDE([Ave Cases/mo],[Total Avg Sales])

===
Total Avg Sales =
CALCULATE([Ave Cases/mo],ALL('PG MPO'[STORE NAME]))

===

Top Stores =
CALCULATE( [Ave Cases/mo],
TOPN( Parameter[Parameter Value], ALL( 'PG MPO'[STORE NAME] ), [Ave Cases/mo],
DESC ),
VALUES( 'PG MPO'[STORE NAME] ) )

====
Top Store Ave Cs =
VAR topnselect =
SELECTEDVALUE ( Parameter[Customize Top Values] )
RETURN
CALCULATE (
[Ave Cases/mo],
KEEPFILTERS ( TOPN ( topnselect, ALL ( 'PG MPO'[STORE NAME] ), [Ave
Cases/mo], DESC ) )
)

====
Top Stores_sample =
VAR storesample = Parameter[Parameter Value]
RETURN
CALCULATE(
[Ave Cases/mo],
KEEPFILTERS( TOPN(storesample, ALL( 'PG MPO'[STORE NAME],'PG MPO'[STORE
CODE],'PG MPO'[REGION]), [Ave Cases/mo], DESC)
))

====
% Ave CS TopN Filter =
CALCULATE(
[% Ave Cs TopN],
KEEPFILTERS(
FILTER(
ALL('PG MPO'[STORE NAME]),
[Ave Cases/mo])))

You might also like