Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Dear Power BI Community,
I am trying to accomplish a histogram of the distribution of overtime hours by employees. Axis = Total Hours (Groups), Values = Total Hours.
My table is set up like this from a report:
ID | Check Date | Hours |
124 | 1/10/2020 | 10 |
124 | 1/10/2020 | 10 |
124 | 1/3/2020 | 15 |
548 | 1/3/2020 | 5 |
548 | 1/10/2020 | 6 |
Now what I did was create a summarize table with the following dax:
Summarize(Table1,Table1[ID],"Total Hours",SUM(Table1[Hours])
I get the following table:
124 | 35 |
548 | 11 |
This is what I want the table to look like, and I created a relationship between the two tables on the ID column setting cross-filtering to "Both".
When I go to only look at a Check Date of 1/10/2020 the answer I should get is:
124 | 20 |
548 | 6 |
But the summarize table is not being changed at all it is pulling in the total still and not recognizing the "Check Date" filter.
My initial thought is it has to do with Sum(Hours) in the Summarize logic.
Any help is appreciated!
Solved! Go to Solution.
Hi!
calculated table will not affected by slicers
but you can create a measure in your SummarizeTable
TotalHoursMeasure = calculate(SUM('Table1'[Hours]),FILTER(ALLEXCEPT('Table1';Table1[Check Date]),Table1[ID]=SELECTEDVALUE('SummarizeTable'[Table1_ID])))
do not hesitate to give a kudo to useful posts and mark solutions as solution
Hi!
calculated table will not affected by slicers
but you can create a measure in your SummarizeTable
TotalHoursMeasure = calculate(SUM('Table1'[Hours]),FILTER(ALLEXCEPT('Table1';Table1[Check Date]),Table1[ID]=SELECTEDVALUE('SummarizeTable'[Table1_ID])))
do not hesitate to give a kudo to useful posts and mark solutions as solution
Thats awesome thank you - I was hoping to be have this as a column so then I can do a histogram off of the total hours, any ideas?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |