Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi
I need some help
See the dataset https://we.tl/t-dKuv7RRhyT
What I want to do is that indepentently what dimension I select i get the average of the dimension Rating that has 4 values C1/C2/C3 and C4
Moreover I want this formula to select the average of only the values where we have sales andt not null data.
The average needs to be done on a metric that i created called [UNit SOld] as
So my DAX formula is
average = VAR CurrentRating = SELECTEDVALUE(Sales[Rating])
Solved! Go to Solution.
Hi @Javif84 ,
Thank you for reaching out to us on the Microsoft Fabric Community Forum.
Once try this measure:
Average_Units_Sold =
CALCULATE(
AVERAGEX(
FILTER(
ALL(Sales),
Sales[Rating] IN {"C1", "C2", "C3", "C4"} && NOT(ISBLANK(Sales[Units Sold]))
),
Sales[Units Sold]
)
)
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
No, te topic is not solves yet 😞
Thanks for asking
Hi @Javif84 ,
Thank you for reaching out to us on the Microsoft Fabric Community Forum.
Once try this measure:
Average_Units_Sold =
CALCULATE(
AVERAGEX(
FILTER(
ALL(Sales),
Sales[Rating] IN {"C1", "C2", "C3", "C4"} && NOT(ISBLANK(Sales[Units Sold]))
),
Sales[Units Sold]
)
)
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Hi @Javif84 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @Javif84 ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @Javif84 ,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
@Javif84 ,
Please try this
Average_Units_Sold =
CALCULATE(
AVERAGEX(
FILTER(Sales, NOT(ISBLANK(Sales[Units Sold]))),
Sales[Units Sold]
),
KEEPFILTERS(Sales[Rating] IN {"C1", "C2", "C3", "C4"}),
REMOVEFILTERS(Sales[AM], Sales[ABM], Sales[Customer Buyer Name])
)
Thanks,
Pankaj
If this solution helps, please accept it and give a kudos, it would be greatly appreciated.
Hello @Javif84
You can try this DAX Measure
Average_Units_Sold =
VAR CurrentRating = SELECTEDVALUE(Sales[Rating])
RETURN
IF(
CurrentRating IN {"C1", "C2", "C3", "C4"},
CALCULATE(
AVERAGEX(
FILTER(Sales, NOT(ISBLANK(Sales[Units Sold]))),
Sales[Units Sold]
),
ALLEXCEPT(Sales, Sales[Rating])
)
)
Thanks,
Pankaj
If this solution helps, please accept it and give a kudos, it would be greatly appreciated.
But I have the same problem
I do not have a unique value for C1, it changes depending on the selection of AM/ABM and Customer Buyer Name
Hi @Javif84 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |