Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi
I have a problem with getting MEDIANX to function.
I want to change this formular from Average to Median:
GNSpurchase = AVERAGE('GAdata'[purchase])
I'm just not sure what to do from here
I have tried this:
Hi @Anonymous
try without calculate
= MEDIANX(GAdata;GAdata[Views])
do not hesitate to give a kudo to useful posts and mark solutions as solution
Does not work - unfortunately 😞
When I do that, it says: "Expression that yield variant data type error cannot be used to defined calculated columns".
@Anonymous
are you sure your Views column is a number? check in the Power Query mode. choose column and set whole or decimal number as data type in the Transform ribbon
and try to create measure, not calculated column
do not hesitate to give a kudo to useful posts and mark solutions as solution
The View column is definitely a number - without decimals as well.
Can you give an example of measure?
@Anonymous
the same as column, but measure.
anyway it looks like your data in Views is inconsistent. maybe you have a null values? if so, you should to solve what to do - delete from calculation or change it to 0 (preferrably in Query Editor mode)
do not hesitate to give a kudo to useful posts and mark solutions as solution
I don't have any null value in the View column. However, I have a lot of zero values. Hmmm....
@Anonymous you could share your pbix-file to check it out
@Anonymous there is no upload function (only for admin) use for example https://uploadfiles.io/ service
do not hesitate to give a kudo to useful posts and mark solutions as solution
@Anonymous
if you create measure, not calculated column it should work
Measure = MEDIANX(GAdata;GAdata[Views])
do not hesitate to give a kudo to useful posts and mark solutions as solution
@Anonymous really?
look at Measure
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |