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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Edgar_massa
Helper II
Helper II

Average with ALL()

Good night sir,

I'm trying to create a measure to bring the value repeatedly, using the ALL function, I created a virtual table and I saw that it works more in the measure it doesn't work, could someone give me a solution?

 

measure

Edgar_massa_0-1665177517217.png

 

 

visual in which I want it to repeat the number for all lines

Edgar_massa_2-1665177590971.png

 

table that I created to validate and it worked

Edgar_massa_3-1665177653835.png

 

1 ACCEPTED SOLUTION

I invite you to watch these videos to better understand 😉

https://www.youtube.com/watch?v=lMuDz6ViU1w

https://www.youtube.com/watch?v=lX2ztEh3tuA

https://www.youtube.com/watch?v=Nm9x83J-SBk

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

16 REPLIES 16
Anonymous
Not applicable

Hi @Edgar_massa ,

Could you please provide more details with your desired output and pbix file without privacy inforamtion?

 

How to Get Your Question Answered Quickly 

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

aj1973
Community Champion
Community Champion

Hi @Edgar_massa 

in your VAR _avg = CALCULATE(AVARAGEX(tf,[X]) , ALL())

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Did not work.

 

Edgar_massa_0-1665244759911.png

 

Edgar_massa_1-1665244774603.png

 

What can it be?

 

 

Please add tf in ALL(tf)

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 

 

Did not work

 

Edgar_massa_0-1665402747668.png

 

Is it possibe you share your PBIX please?

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Is this what you want to see?

aj1973_0-1665408275405.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 

Yes, but I want it within the measure

Sorry I don't understand your request. But if you need to see the avg inside your visual you will need to link your tables

aj1973_0-1665410210215.png

Or show me the outcome you want to see

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

I created the virtual table to simulate and see if the value was correct, but I want to get only the avg_ variable within a measure for my visual, I don't want to create a virtual table to relate, understand?

 

Same in the print below

 

Edgar_massa_0-1665410705778.png

 

the result I want is this but within a measure

Edgar_massa_1-1665410809673.png

 

 

bringing the result equal to the column you asked if it was like I wanted

 

 

Add a new measure

aj1973_0-1665414511486.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

excellent bro

But why can't I do the last calculate with the all there in the variables?

I invite you to watch these videos to better understand 😉

https://www.youtube.com/watch?v=lMuDz6ViU1w

https://www.youtube.com/watch?v=lX2ztEh3tuA

https://www.youtube.com/watch?v=Nm9x83J-SBk

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

I watched the videos, I understood the issue of the context filter and line filter, but I don't know if I understood it right in my case, if it's because the variable is constant, but anyway..

Thanks a lot for the help

Sometimes DAX is a bit complex to understand that's why i sometimes take things for granted 😁

 

Welcome

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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