Forum Discussion
Regroup measure for graph
- Anonymous2 years ago
Thanks for your answer and your time v-yifanw-msft !
I have already test with the EARLIER function but it's strange because with datas from Excel file it works easily but with my dataset from my ERP it refuses to accept the EARLIER function in my CALCULATE.I find a way to get my result.
I create a new column to get an unique key by concatenating Date and ID Palette.
Then I create a new Table with GROUPBY this Key, I had a new column to count how many rows I have for each key in the Table “Preparation”.
And finally I regroup data of this column to create my graph.
Hi Anonymous ,
Depending on the information you have provided, you can follow the steps below:
Sample data:
1.Add new column.(X-aixs can not be measure)
Number of preparation row =
VAR _NUMBER_OF_ROW =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[perparation] = EARLIER ( 'Table'[perparation] ) )
)
RETURN
IF (
_NUMBER_OF_ROW <= 2,
"1-2",
IF (
_NUMBER_OF_ROW <= 5,
"3-5",
IF (
_NUMBER_OF_ROW <= 10,
"6-10",
IF (
_NUMBER_OF_ROW <= 15,
"10-15",
IF ( _NUMBER_OF_ROW <= 20, "16-20", "20 and more" )
)
)
)
)
2.Put data into chart.
Final output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your answer and your time v-yifanw-msft !
I have already test with the EARLIER function but it's strange because with datas from Excel file it works easily but with my dataset from my ERP it refuses to accept the EARLIER function in my CALCULATE.
I find a way to get my result.
I create a new column to get an unique key by concatenating Date and ID Palette.
Then I create a new Table with GROUPBY this Key, I had a new column to count how many rows I have for each key in the Table “Preparation”.
And finally I regroup data of this column to create my graph.
- Anonymous2 years agoNot applicable
Hi Anonymous ,
I am glad to hear that you have solved the problem and are willing to share with us how you did it. Hopefully your answer will help more people!
Best Regards,
Ada Wang