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 everybody,
I need your help to create a new table with conditions. I know how to create a new table, but don't what is the formula to calculated what I want :
I have the first table, and I want the new one.
Thanks a lot for your help,
Joc
Solved! Go to Solution.
Hi @joc,
You can use below table formula to summary original table records:
Summary Table = ADDCOLUMNS( ADDCOLUMNS( SUMMARIZE('Test Table',[Week],"Col 1",SUMX(FILTER('Test Table',[Week]=EARLIER('Test Table'[Week])&&OR('Test Table'[Name]="A",'Test Table'[Name]="B")),[Value])), "Col 2",[Col 1]+[Col 1]/2), "Col 3",[Col 1]-[Col 2])
Based on your result table, you 'col2' formula should be "A+B+(C+D)/2", right?
If this is a case, you can use below formula to instead:
Summary Table = ADDCOLUMNS( ADDCOLUMNS( SUMMARIZE('Test Table',[Week],"Col 1",SUMX(FILTER('Test Table',[Week]=EARLIER('Test Table'[Week])&&OR('Test Table'[Name]="A",'Test Table'[Name]="B")),[Value])), "Col 2",[Col 1]+(SUMX(FILTER('Test Table',[Week]=EARLIER('Test Table'[Week])),[Value])-[Col 1])/2), "Col 3",[Col 1]-[Col 2])
Regards,
Xiaoxin Sheng
Hi @joc,
You can use below table formula to summary original table records:
Summary Table = ADDCOLUMNS( ADDCOLUMNS( SUMMARIZE('Test Table',[Week],"Col 1",SUMX(FILTER('Test Table',[Week]=EARLIER('Test Table'[Week])&&OR('Test Table'[Name]="A",'Test Table'[Name]="B")),[Value])), "Col 2",[Col 1]+[Col 1]/2), "Col 3",[Col 1]-[Col 2])
Based on your result table, you 'col2' formula should be "A+B+(C+D)/2", right?
If this is a case, you can use below formula to instead:
Summary Table = ADDCOLUMNS( ADDCOLUMNS( SUMMARIZE('Test Table',[Week],"Col 1",SUMX(FILTER('Test Table',[Week]=EARLIER('Test Table'[Week])&&OR('Test Table'[Name]="A",'Test Table'[Name]="B")),[Value])), "Col 2",[Col 1]+(SUMX(FILTER('Test Table',[Week]=EARLIER('Test Table'[Week])),[Value])-[Col 1])/2), "Col 3",[Col 1]-[Col 2])
Regards,
Xiaoxin Sheng
Perfect thanks a lot !
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
88 | |
52 | |
45 | |
39 | |
38 |