Forum Discussion
Regroup measure for graph
Hi there !
After some research and some tests i can't find a solution so I decide to post here to find a solution with you guys !
I've got a dataset with several Tables but only one is about my question, we will call it "Preparation".
In this Table i've got all the palette done in my company, one row = one preparation, one palette = one or several preparation.
I also have measure to count the number of palette depending filter and the number of preparation for each palette.
I would like to do a graph to show something like this :
How do you think I could do to success ?
Thanks a lot for your help !
Regards
- 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.
3 Replies
- AnonymousNot applicable
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.
- AnonymousNot applicable
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.- AnonymousNot 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