- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aggregate values by Date selections
<span;>Hi, I have the following table below. As it stands using one days worth of data, this table works perfectly. My % column takes the value of a singular row and divides by the total of the value by ID.
<span;>
<span;>%=DIVIDE(
<span;> [Value],
<span;> CALCULATE(
<span;> SUM(Table1[Value]),
<span;> ALLEXCEPT(Table1, Table1[ID])))
<span;>ID. Value. %
<span;>1 100. 10%
<span;>1. 100. 10%
<span;>1. 300. 30%
<span;>1. 500. 50%
<span;>2. 200. 40%
<span;>2. 100. 20%
<span;>2. 200. 40%
<span;>However, when I add another days worth of data in but filter on just one day (tw_date), the value reacts to the latest date and sums it correctly but the % column doesn't and it returns the percentage value based on the 2 days.
<span;>Any idea how to change this please so it reacts to the dates selected please
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@M_SBS_6 Well, I *think* the issue is your ALLEXCEPT removing the date context so probably need to include the column your slicer is based on within your ALLEXCEPT?
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @M_SBS_6
I added another date to the data you provided.
You can change the formula to something like this:
% = DIVIDE([Value], CALCULATE(SUM(Table1[Value]), ALLEXCEPT(Table1, Table1[ID], Table1[Date])))
Is this the result you expect?
Best Regards,
Community Support Team _Yuliax
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Share some data to work with and show the expected result.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@M_SBS_6 Well, I *think* the issue is your ALLEXCEPT removing the date context so probably need to include the column your slicer is based on within your ALLEXCEPT?
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
05-13-2024 12:29 AM | |||
07-22-2024 04:04 AM | |||
08-22-2024 11:02 AM | |||
Anonymous
| 08-03-2023 03:06 AM | ||
06-29-2024 08:08 AM |
User | Count |
---|---|
117 | |
96 | |
83 | |
55 | |
46 |