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.
Hello, i would like some help, im trying to do the following on the query editor.
as shown on the screenshot for the columns, i need to do:
[sum of consumes] divided [sum of homes] filtered when [type = "R"] and [ identification = "condominios" ]
thks.
You can use something like this and once you get your desired column, you can do some either using Invoke Custom Function or Custom Column.
Thks Bhavesh, but i dont think i can use that example.
Because the columns that i need to divide have lots of differents values, or at least im not seeing how this would apply to my case where i want 1 value across all rows in a new column, and this value is the result of the formula above.
I would suggest then that you keep things simple and do it step by step rather than in one task.
Make a calculated column: sumC = Sumx(Table,Field)
Make a calculate column: sumH = Sumx(Table,Field)
this allows you to visually verify
then make a calculated column: Final = IF([type] = "R" AND [identification] = "condominios"),sumC/sumH,0)
Interesting approach, i will test to see how things look like with this. I actually did all in one go with "calculate", "divide" and "filter", but the way you suggested is simpler.
Any way, thks both cahaba and bavesh, to learn how to use chains of DAX commands in powerquery i will probably need to do a online course or something that is more time consuming. I just read "Power Query Formula Language Specification (August 2015)", but its all CLOUDY right now hauahuah.
actually my suggestion renders a different value per row - - and am not sure that is what you seek based upon our original exchange.
You seek a single value - that is displaying in a new column - and that single value is the same on every row?
If not please clarify with an example of a few rows that are your goal.
Xiauxian posted a solution on my other thread, using DAX commands.
However, if i can learn to do the some calculations on the query editor, more knowledge are always good :).
yes cahaba, thats exactly what i seek **1 value on every row**, in truth i need to do several calculations with single results, because i need the average results of a year, for some indicators.
The example above would cover me for every calculation that i need to do, because everything uses the same pattern in the calculations, just the filters would be different.
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |