Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am trying to obtain a count, but including the results of more than one column.
With the data gived as following:
I would like to obtain a a visualization like the following, but for the agrupattion of both columns, not only SYMPTOM1
The thing is that the values placed in SYMPTOM1, and SYMPTOM2, could be the same, but I want to count the total for both of them.
Do you know how I can I do this count?
Thank you in advance! 🙂
Solved! Go to Solution.
Hi @Anonymous ,
You may need to transform the table using the following formula:
NewTable =
var _t1= SELECTCOLUMNS('Table',"VALUES_ID",[VALUES_ID],"SYMPOM",[SYMPOM1],"SYMPTOMVERSION",[SYMPTOMVERSION1])
var _t2= SELECTCOLUMNS('Table',"VALUES_ID",[VALUES_ID],"SYMPOM",[SYMPOM2],"SYMPTOMVERSION",[SYMPTOMVERSION2])
return UNION(_t1,_t2)
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
You may need to transform the table using the following formula:
NewTable =
var _t1= SELECTCOLUMNS('Table',"VALUES_ID",[VALUES_ID],"SYMPOM",[SYMPOM1],"SYMPTOMVERSION",[SYMPTOMVERSION1])
var _t2= SELECTCOLUMNS('Table',"VALUES_ID",[VALUES_ID],"SYMPOM",[SYMPOM2],"SYMPTOMVERSION",[SYMPTOMVERSION2])
return UNION(_t1,_t2)
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for the solution, it works 🙂
I also thought I may use Power Query to UNPIVOT the columns and analyze the resulting table.
Thank you!
Hi @Anonymous
Can you post sample data as text and expected output?
Not enough information to go on;
please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables
Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |