Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi everyone,
you have been very Helpfull to me and i really appreaciate that.
I'm trying to calculate the Coefficent of variance for different Product name. I have 300 Product name
and their Selling Price. Also I will apply outside filter for Regions.
I used the Quick measure in power bi
Vari = VARX.P(KEEPFILTERS(VALUES('TABLE'[Product NAME])), CALCULATE [ Selling Price]))
Selling Price is Calculated measure.
but the result was 0.00 for all the products. i'm not sure where is the problem ?
Hi, @SalmanABDul_97
May I ask if your problem has been solved? Is the above post helpful to you?
Could you please consider sharing more details about it and posting expected result so it is clear on what needs to be implemented? And It would be great if there is a sample file without any sesentive information here.
It makes it easier to give you a solution.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SalmanABDul_97 - it difficult to comment with access to the underlying data model, but I am not sure why or if you need CALCULATE to change the filter context. It might help to read the following blog on ALLSELECTED to understand what is happening in the background. The definitive guide to ALLSELECTED - SQLBI
Hi @SalmanABDul_97 , the DAX syntax does not look correct. "Keepfilters(Value('Table'[Product Name]))" will be a table containing one column with Product Names, it will not contain the Selling Price. "Calculate ( [Selling Price] )" would not be correct because it is expecting a column not a measure.
Please consider the following VARX.P - DAX Guide for more information.
It is possible that you need to create a table Variable like this.
CoV =
VAR _temp = SUMMARIZE ( Table, Table[Product Name] )
VAR _add = ADDCOLUMNS ( _Temp, "Add Selling Price" , [Selling Price] )
RETURN
VARX.P( _add, [Add Selling Price] )
I used this dax function for calculating STD
STD = Calculate(STDEVX.P('fact table', [Value]) , ALLSELECTED () )
the issue with this is it give me wrong std , greater than mean.
same dax i used to find CV but its give me high cv number >100
and problem is beacuse it calculate std wrong.
i need it dynamic whenever i change out filter it should change so i used ALLSELECTD
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |