We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
How to write measure of the column header with Sales > 60 and the total value is 100?
| Product | Sales | Sales > 60 |
| A | 100 | 100 |
| B | 30 | |
| C | 50 | |
| Total | 180 | 100 |
Solved! Go to Solution.
for the second scenario,
please try this
Measure =
VAR _value=SELECTEDVALUE('Table'[SALES])
return IF(_value>100,_value,SUMX(FILTER('Table','Table'[SALES]>60),'Table'[SALES]))Proud to be a Super User!
Hi @Sam_2020 ,
If purpose is to display only max value and to display same value in total, below is formula:
Thanks Namaja for your reply.
If I have other product which are >60, then how should i write the measure?
| Product | Sales | Sales > 60 |
| A | 100 | 100 |
| B | 30 | |
| C | 50 | |
| D | 75 | 75 |
| E | 90 | 90 |
| Total | 345 | 265 |
for the second scenario,
please try this
Measure =
VAR _value=SELECTEDVALUE('Table'[SALES])
return IF(_value>100,_value,SUMX(FILTER('Table','Table'[SALES]>60),'Table'[SALES]))Proud to be a Super User!
Thanks.
It works perfectly.
Are you able to explain "return IF(_value>100;_value;"?
Do I need to look the highest value and indicate in my measure?
No need to look the highest value. I didn't use Max function.
_value is to select the value(please see VAR function), if >100, then select and display
https://docs.microsoft.com/en-us/dax/var-dax
Proud to be a Super User!
Please try this
Measure = IF(SELECTEDVALUE('Table'[SALES])=100,100,SUMX(FILTER('Table','Table'[SALES]=100),'Table'[SALES]))Proud to be a Super User!
Hello Nemanja, thanks for the response. I am not looking for the MAX value. What I am looking for is creation of a measure by the simple clicking on any bar - that becomes my selected category. If I get that category name as a new measure, I want to create another chart detailing the sales trend of that category over a period of time. Maybe this is wishful thinking - the experts can give their opinion.
kkanda
Hello All,
My question was diffrent and I do not know how it got clubbed with another query.
This question is still open and there is no accepted solution.
Will you please remove the "ACCEPTED SOLUTION" from my original post, so that others will look at it?
Thanks
kkanda
Please share your post link or create a new post
.
Proud to be a Super User!
This question was answered by Nemanja.
Thanks for all responses.
Hi @kkanda ,
By mistake i tagged you on this question.
I also now answered on your question 🙂
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 |
|---|---|
| 57 | |
| 38 | |
| 32 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 66 | |
| 40 | |
| 34 | |
| 25 |