Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi all,
I have a table with retailers, categories and values.
To calculate the percentage of categories per retailer, I am using a measure from this forum.
Ret % =
Var _N1=[TT Sum]
Var _N2=CALCULATE(SUM(Data[Value]),FILTER(ALL(Data),[Retailer]=SELECTEDVALUE(DimRetailer[Retailer])))
Return
DIVIDE(_N1,_N2)
Now I am still at a loss how to calculate the average of all retailers per category from the result of the measure.
Any help is appreciated!
Solved! Go to Solution.
Hi @Anonymous ,
This is exactly what I was looking for, thank you so much!
I have adjusted the formula with AVERAGEX and the results are perfect.
Measure =
VAR _1 =
SUMMARIZE ( DimRetailer, DimRetailer[Retailer], "aaa", [Ret %] )
RETURN
IF ( ISINSCOPE ( DimRetailer[Retailer] ), [Ret %], AVERAGEX( _1, [aaa] ) )
Hi @MBreden ,
Please have a try.
Create another measure.
Measure =
VAR _1 =
SUMMARIZE ( DimRetailer, DimRetailer[Retailer], "aaa", [Ret %] )
RETURN
IF ( ISINSCOPE ( DimRetailer[Retailer] ), [Ret %], SUMX ( _1, [aaa] ) / 4 )
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
This is exactly what I was looking for, thank you so much!
I have adjusted the formula with AVERAGEX and the results are perfect.
Measure =
VAR _1 =
SUMMARIZE ( DimRetailer, DimRetailer[Retailer], "aaa", [Ret %] )
RETURN
IF ( ISINSCOPE ( DimRetailer[Retailer] ), [Ret %], AVERAGEX( _1, [aaa] ) )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
12 | |
10 | |
9 | |
9 |
User | Count |
---|---|
17 | |
16 | |
13 | |
11 | |
11 |