Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Happy Friday
Hopefully someone can help me please
I'm trying to create a new column where I want a category to incorporate everything and then another category to only include a few. So for example
Repairs 1
Repairs 2
Repairs 3
Repairs 4
Repairs 5
Repairs 6
In one category I want to include all 6 and in the other I only want to include 1,2,3. And then for instance give it a title of
Category Fix which includes the below
'All' Includes 1-6
Other Includes 1-3
Does that make sense
In my dataset there are many descriptions, the above is just for the purpose of explaining this. If there were only a few and they were static descriptions I could create a table myself and do it that way but if new ones were to appear they wouldn't automatically get included, so I can't do it that way
Hope someone can help please
Many thanks
Karen
Good morning
Sadly that didnt work. The actual split does works. So
Repairs
All
However the calcualtions aren't working as they should.
Kind regards
Karen
Hi @KarenFingerhut ,
Thank you for your kind reply!
Could you please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:
How to provide sample data in the Power BI Forum
And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
We could offer you more help if we have information in detail. Thank you for your understanding! Your time and cooperation are much valued by us. We are looking forward to hearing from you to assist further.
Best regards,
Lucy Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@KarenFingerhut , Create a new column using
DAX
Category Fix =
SWITCH(
TRUE(),
'Table'[Description] IN {"Repairs 1", "Repairs 2", "Repairs 3"}, "Other",
'Table'[Description] IN {"Repairs 1", "Repairs 2", "Repairs 3", "Repairs 4", "Repairs 5", "Repairs 6"}, "All",
BLANK()
)
Proud to be a Super User! |
|
Thanks @bhanu_gautam
Ordinarily that would work. The problem is I have about 30 different descriptions and new ones could be added at any time, so I can't hardcode them all like you have done in your DAX statement. The only ones I can hardcode are the ones I want to split out as there is only 3
Many thanks
Karen
@KarenFingerhut , Create a calculated column than
IsOther =
IF(
'Table'[Description] IN {"Repairs 1", "Repairs 2", "Repairs 3"},
TRUE(),
FALSE()
)
And from that create one more
Category Fix =
IF(
'Table'[IsOther],
"Other",
"All"
)
Proud to be a Super User! |
|
Hi @KarenFingerhut ,
Did the reply bhanu_gautam offered help you solve the problem, if it helps, you can consider to accept it as a solution so that more user can refer to, or if you have other problems, you can offer some information so that can provide more suggestion for you.
Thanks for your understanding.
Best regards,
Lucy Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |