The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I would like some guidance on how to create a column that satisfies the following condition: I want the column to return me if the attribute value "A1" for element "E1" in table "A" is equal to or different from the attribute value "A1" for element "E1" in table "B". And so on... If the values are equal, I would like the column to display the message "equal parameters"; otherwise "parameters different". It is important to mention that the attributes and elements are the same in all tables.
Solved! Go to Solution.
Hi @Iguinrj ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a calculated column.
Column = var a=CALCULATE(DISTINCTCOUNT('Table'[TABELA]),FILTER('Table','Table'[TABELA]<>EARLIER('Table'[TABELA])))
var b=CALCULATE(DISTINCTCOUNT('Table'[TABELA]),FILTER('Table',[EMEMENTO]=EARLIER('Table'[EMEMENTO])&&[ATRIBUTO]=EARLIER('Table'[ATRIBUTO])&&[TABELA]<>EARLIER('Table'[TABELA])))
return IF(a=b,"equal parameters","parameters different")
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
All is well?
I thought I had solved it, but I couldn't get the expected result. I'm sending you a model so you can apply the solution, please.
I need to compare versions of the same attribute of the same element from each table.
If they were the same, I wanted it to return me in the matrix line: "equal versions". If different, return in line: "parameters different".
This comparison needs to be between each attribute of each element of each table.
I am not able to attach the pbix with
Thank you friend. I have a great day
Hi @Iguinrj ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a calculated column.
Column = var a=CALCULATE(DISTINCTCOUNT('Table'[TABELA]),FILTER('Table','Table'[TABELA]<>EARLIER('Table'[TABELA])))
var b=CALCULATE(DISTINCTCOUNT('Table'[TABELA]),FILTER('Table',[EMEMENTO]=EARLIER('Table'[EMEMENTO])&&[ATRIBUTO]=EARLIER('Table'[ATRIBUTO])&&[TABELA]<>EARLIER('Table'[TABELA])))
return IF(a=b,"equal parameters","parameters different")
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
8 | |
7 |