Forum Discussion
How to create new table with data from another table using DAX
Hello, I was wondering if someone could help me write a DAX function to create a new table in Power BI as follows:
I currently have a table that looks like this:
| Incident ID | Application Name | Severity |
| 001 | App1 | High |
| 002 | App2 | Low |
| 003 | App1 | High |
| 004 | App3 | Medium |
| 005 | App2 | Low |
| 006 | App2 | Medium |
I need to convert this data into a new table in Power BI that looks like this:
| Application Name | High | Medium | Low |
| App1 | 2 | 0 | 0 |
| App2 | 0 | 1 | 2 |
| App3 | 0 | 1 | 0 |
Basically, I need to show the counts of each high, medium, and low incident by application in a new table. I will be using those numbers for further calculations.
How can I write a DAX expression to create this table for me? Any help would be appreciated.
By the looks of it, you can use a simple matrix + measures or field parameters (for measures) to get the result you are expecting
We will be happy to help if you provide sample data and the calculations needed for each "column" in your expected outcome
7 Replies
- Bifinity_75Solution Sage
Hi devenk2 , you don't need to write anything in DAX.
- Insert a matrix, and place field on your site as shown in the image:
Best Regards
- devenk2Frequent Visitor
I understand I can do this in a Matrix, but I need to create a new table so I can do further calculations on this dataset. I cannot do what I need to do with a matrix.
- PaulDBrownCommunity Champion
Sorry to ask, but what calculations do you need to do which cannot be done with the original table (which is the ideal layout for tabular models)?