Forum Discussion
LOD? DAX?
- 4 years ago
Hey Anonymous ,
I think I found the reason. You added the formula as calculated column, but you have to add it as measure:
Then the result is correct:
To understand the difference, a calculated column is just a new column in the table. In your case you added a new column that returned for every row the average of
tableforqty[ONHAND_QTY] what is for each row the same value as the column tableforqty[ONHAND_QTY]. When you put that calculated column in the matrix the visual was summing up the averages, what was equal to the total.If you use a measure it will always be calculated on the fly and in the context that you are using it. So if you put the measure in the matrix, it will calculate the average for each Component_Code and also for the total.You can see the difference also by the logo. The calculated column [On Hand Average] has the icon of a table, the measure [On Hand Average as Measure] has the icon of a measure.If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
Anonymous When the result is different, then the underlying data will be different. Take a look at the table and analyze it. You can also share the file with me, then I can take a look.
hi selimovd how do i share file with confidential data? I really want to but there is so much confidentality. and it's connecting to dataflow. how is that possible for sharing?
- Anonymous4 years agoNot applicable
selimovd thank you so much for this wonderful information. i didnot know it until you mentioned it to me. thanks!
- selimovd4 years agoMost Valuable Professional
Hey Anonymous ,
no if there is confidential data you can't share. You can import the data from dataflow, then you could share the file.
In this case take a look at the data table and check the values in the column. The average for Component_Code 12P9813X032 will be 112'429.53, so there should be some big values.
If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic - Anonymous4 years agoNot applicable
selimovd i was able to hide some of the confidential columns. you may now check the sample pbix, to help me fix the solution.
https://www.dropbox.com/s/bo84cwqa7lpmcha/samplepbi.pbix?dl=0
- selimovd4 years agoMost Valuable Professional
Hey Anonymous ,
I think I found the reason. You added the formula as calculated column, but you have to add it as measure:
Then the result is correct:
To understand the difference, a calculated column is just a new column in the table. In your case you added a new column that returned for every row the average of
tableforqty[ONHAND_QTY] what is for each row the same value as the column tableforqty[ONHAND_QTY]. When you put that calculated column in the matrix the visual was summing up the averages, what was equal to the total.If you use a measure it will always be calculated on the fly and in the context that you are using it. So if you put the measure in the matrix, it will calculate the average for each Component_Code and also for the total.You can see the difference also by the logo. The calculated column [On Hand Average] has the icon of a table, the measure [On Hand Average as Measure] has the icon of a measure.If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic