Forum Discussion
Rai_BI
Helper IV
2 years agoDynamic summation
Hello friends, Can anyone help me solve this problem? In Power BI, I have a table with two columns. The 'Salesperson 1' column and the 'Salesperson 2' column. I want to create three table visual...
- Anonymous2 years ago
Hi Rai_BI ,
We can create a measure.
Measure 4 = SWITCH ( TRUE (), SELECTEDVALUE ( 'Slicer'[Seller]) = "Name Seller1", SUMX ( VALUES ( 'customer table'[Name Seller1] ), [Measure Test] ), SELECTEDVALUE ( 'Slicer'[Seller]) = "Name Seller2",SUMX ( VALUES ( 'customer table'[Name Seller2] ), [Measure Test] ), SUMX(SUMMARIZE('customer table','customer table'[Name Seller1],'customer table'[Name Seller2],"measure",[Measure Test]),[measure]) )We can create a slicer table.
Slicer = DATATABLE ( "Seller", STRING, { { "Name Seller1" }, { "Name Seller2" } } )Edit interactions for each slicer in the format pane and hide the slicers.
If you don't want to use a slicer, you can refer to this post to create a field parameter.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi Rai_BI ,
We can create a measure.
Measure 4 =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Slicer'[Seller]) = "Name Seller1", SUMX ( VALUES ( 'customer table'[Name Seller1] ), [Measure Test] ),
SELECTEDVALUE ( 'Slicer'[Seller]) = "Name Seller2",SUMX ( VALUES ( 'customer table'[Name Seller2] ), [Measure Test] ),
SUMX(SUMMARIZE('customer table','customer table'[Name Seller1],'customer table'[Name Seller2],"measure",[Measure Test]),[measure])
)
We can create a slicer table.
Slicer = DATATABLE (
"Seller", STRING,
{
{ "Name Seller1" },
{ "Name Seller2" }
}
)
Edit interactions for each slicer in the format pane and hide the slicers.
If you don't want to use a slicer, you can refer to this post to create a field parameter.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.