Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello, I'm newby in DAX. i need to ask for favour some experts because I dot't get how to sum it.
Thanks in advanced.
I try to sum value from product by weeks
My measure sum all not filtered by
Qty total for Product (code) = CALCULATE(SUM('Sheet'[Qty]);ALLSELECTED('Sheet'[My_date_column]);'Sheet'[Column_with_nr_week])
Dear Derek you have right about my knowledge of Dax. I need to start learn:)
Meanwhile I solve my case in those formula
Measure = CALCULATE ( SUM ( 'Sheet'[Qty] ); ALLEXCEPT ( 'Sheet'; 'Sheet'[NR_of_week]; 'Sheet'[Material (code)] ) )
Mate, there is a good rule in DAX:
DO NOT USE A FUNCTION IN YOUR CODE IF YOU DON'T KNOW PRECISELY HOW IT WORKS.
Let this statement above sink in. If you don't stick to it, you'll be sorry rather sooner than later. Please, before you start using something in your DAX code read about it. Here's a good source: www.daxguide.com.
Do you have any idea how ALLSELECTED works? No? That's what I thought.
ALLSELECTED is a very complex DAX function that works with something that's called "shadow filter context." To use it correctly you have to know quite a few things. Once again, please read about it.
Your measure should in all likelihood be this:
Qty total for Product (code) = SUM( 'Sheet'[Qty] )
I'd also urge you to read about the proper dimensional design.
Best
Darek
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
7 | |
7 | |
6 | |
6 |
User | Count |
---|---|
27 | |
12 | |
10 | |
9 | |
6 |