Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am looking to group two columns and find the sum of result, as given in the table below.
I hope we can use Summarize() to acheive this , but that would create a new table and I dont want the result as a new table. I want to have this column with in the same table as a calculated column, Thanks in advance for your help!
Date | ID | Value | Expected result |
23/11/2017 | A21vc | 0 | 2 |
23/11/2017 | B3gav | 1 | |
23/11/2017 | J6gfb | 1 | |
23/11/2017 | G5612 | 0 | |
24/112017 | A21vc | 1 | 2 |
24/112017 | B3gav | 0 | |
24/112017 | J6gfb | 1 | |
25/11/2017 | A21vc | 0 | 2 |
25/11/2017 | B3gav | 0 | |
25/11/2017 | J6gfb | 1 | |
25/11/2017 | G5612 | 1 |
Regards,
Solved! Go to Solution.
HI @Anonymous
I just changed
(sum('Fact Vacancy_Indvi'[Addition]))
to
(sum('Fact Vacancy_Indvi'[Mes]))
Hi @Anonymous
See if this helps.
Do you want the resulting sum only against the first item of that date?
= VAR Firstitem = FIRSTNONBLANK ( CALCULATETABLE ( VALUES ( Table1[ID] ), FILTER ( ALL ( Table1 ), Table1[Date] = EARLIER ( Table1[Date] ) ) ), Table1[ID] ) RETURN IF ( Table1[ID] = Firstitem, CALCULATE ( SUM ( Table1[Value] ), ALLEXCEPT ( Table1, Table1[Date] ) ), BLANK () )
Thanks Zubair,
I have tried your formula, but I get an empty column, below is my screeen shot.
Kindly let me know if you need any more info
column =
VAR Firstitem =
FIRSTNONBLANK (
CALCULATETABLE (
VALUES ( 'Fact Vacancy_Indvi'[Did] ),
FILTER ( ALL ( 'Fact Vacancy_Indvi' ), 'Fact Vacancy_Indvi'[Date] = EARLIER ( 'Fact Vacancy_Indvi'[Date] ) )
),
'Fact Vacancy_Indvi'[Did]
)
RETURN
IF (
'Fact Vacancy_Indvi'[Did] = Firstitem,
CALCULATE ( (sum('Fact Vacancy_Indvi'[Addition])) , ALLEXCEPT ( 'Fact Vacancy_Indvi', 'Fact Vacancy_Indvi'[Date] ) ),
BLANK ()
)
Thanks,
Hi @Anonymous
It worked with the first sample you provied
Could you share the file?
Hi Zubair_Muhammad ,
Below is the link for the sample dataset , kindly let me know if you need anything else
https://drive.google.com/open?id=148r_DPdsPz9aZACA4CcFr70MnpD5VUvl
Thanks,
HI @Anonymous
I just changed
(sum('Fact Vacancy_Indvi'[Addition]))
to
(sum('Fact Vacancy_Indvi'[Mes]))
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 |
---|---|
72 | |
70 | |
55 | |
37 | |
31 |
User | Count |
---|---|
83 | |
64 | |
63 | |
49 | |
45 |