# Showing Values of Filtered Rows in Same Visual

Hi,

I have a bar chart that displays Actuals which has visual level filter for set of current franchises.

I want to get the actuals of those filtered new franchises actuals and do a variance calculation.

So Basically to display actuals of current franchise & variances with new franchise however against same axis of current franchise.

Attached pbix

Thanks,
Archer

Sample pbix.pbix (6.7 MB)

Hi Archer,

As far as I understand your question, you want normalized values per franchise, is this correct ?

Sample pbix DS.pbix (6.7 MB)

1. Normalized =
VAR CurrentCoverage = CALCULATE(SUMX(Data,Data[Actuals]),Data[Franchise] IN {â€śAWMâ€ť,â€śReconâ€ť,â€śSPMâ€ť, â€śTraumaâ€ť, â€śENTâ€ť})
VAR OptimizedCoverage = CALCULATE(Sumx(Data,Data[Actuals]),Data[Franchise] IN {â€śAWM:ETS_95â€ť,â€śENT:ETS_95â€ť,â€śRecon:ETS_95â€ť,â€śSPM:ETS_95â€ť,â€śTrauma:ETS_95â€ť})

VAR NormalizedFactor = CurrentCoverage / OptimizedCoverage
Var NormalizedperFranchise = [Total Actual] * NormalizedFactor
RETURN NormalizedperFranchise

2. Total Actual = SUM( Data[Actuals] )

3. VarianceNew = [Total Actual] - [Normalized]

To shorten the formulas in the measures, I have changed the table name from â€śvw_fct_tara_optimization_outputâ€ť into â€śDataâ€ť and â€śActual Valuesâ€ť into â€śActualsâ€ť .

Thanks for responding with an action from your end.
I am actually looking to get the variance between Current and Optimized not looking for normalized factor.
A simple Optimized value minus Current Value.
For Example in the screenshot you posted in your response above
In the Optimized Table,
I am looking to get Current Actuals Values side by side like Recon:ETS_95 and Recon Value in same table and get a variance between them
I have attached excel file with what I am trying to achieve hope this will clarify confusion created by my requirement.

Thanks,
Archer

Optimized and Variance Plot.xlsx (15.3 KB)

Hi Archer,

Thanks for the explanation, sorry, I overlooked that.

I added a table FranchiseInfo, whereby the franchise-types are grouped.
Measures are made for Total Current and Total Optimized, and Variance,

Please use â€śFranchiseâ€ť from the FranchiseInfo table for your visuals (see the attached PBIX);
â€śFranchiseâ€ť groups the 2 types of Franchises (Optimized and Current, as AWM ETS_95 and AWM ) per franchise together, so the variance will always appear correctly, regards if you select Optimized or Current in your visual, (it sums the 2 types) .
Also no filters needed in the visuals.

Sample pbix DS Variance.pbix (6.7 MB)

3 Likes

Thatâ€™s it ! you nailed this one
Thank you so much @deltaselect

1 Like