Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
GabrielGloria
New Member

ALL SELECTED,

Hello, everyone!

Im beggining with DAX languages, power BI, Power Pivot and etc.

Im using dax in a excel Pivot analysis and im with problemas with context filters.


This is my Data of one process that the stores have until 2 days to do the process.
And when it doesnt do, a flag is generated.
I will generate the average and the standard deviaton, and give pontuations, 1 for stores that average is between average and average + std dev and 3 for stores that are over the Averaga+std dev.

GabrielGloria_0-1666281112878.png


I have jul and aug data for more than 300 stores divided by 3 districts.

I create a pivot but i cannot filter ok.

I use:

Average Flags:= CALCULATE (AVERAGE(FT_Check[Flags]); ALLSELECTED(FT_Check))

and

Std Dev:= CALCULATE (STDEV.P(FT_Check[Flags]); ALLSELECTED(FT_Check))

But i remove all internal filters and mantain the externals with ALLSELECTED.

Is there some solution to remove all filters and mantain just the "begin date" with external filter ok?

Example:

GabrielGloria_1-1666283137864.pngGabrielGloria_2-1666283152069.png


But when i filter the district, the Averages and Std Devs changing, like:

GabrielGloria_3-1666283200451.png

 

Could i use to "ALL" formulas inside the "Calculate"?

4 REPLIES 4
deevaker
Resolver I
Resolver I

So do you want to ignore filters only for the stores?
For this you can put only those columns in allselected you want to ignore. 

Average Flags:=CALCULATE(AVERAGE(FT_Check[Flags]);ALLSELECTED(FT_Check;FT_Check[Store]))

Std Dev:=CALCULATE(STDEV.P(FT_Check[Flags]);ALLSELECTED(FT_Check;FT_Check[Store]))


let me know if that works. else if you want we can connect @91-9711975011 or deevaker@hotmail.com
Thanks
Deevaker Goel

https://www.linkedin.com/in/deevakerg/

Thanks!!

But it doesnt work yet.

i want that my average calculates freezy with all the filters except about the period of time.

Example:

Stores of
Dist 1: ABC, DEF and GHI.
Dist 2: XYZ, JKL and QWE.

When I filter July, the average of all stores was 25%.

I want the tabel shows 25% in this column independent of the district filter at slicer.

But Thank you so much!!

deevaker
Resolver I
Resolver I

You can try allexcept() function where just put those column name that should not be ignored from filter like your external columns and/or begin date

Hi Deevaker!

Have i put ALLEXCEPT like a "filter2" in Calculate?

I ve tried these:

Average Flags:=CALCULATE(AVERAGE(FT_Check[Flags]);ALLEXCEPT(FT_Check;FT_Check[Begin Date]))

Std Dev:=CALCULATE(STDEV.P(FT_Check[Flags]);ALLEXCEPT(FT_Check;FT_Check[Begin Date]))

But it doesnt work, because the average and std dev, use all the database, independent of the filters:

GabrielGloria_0-1666285255939.png

 

GabrielGloria_1-1666285255946.png

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.