Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I have a measure which gives me sales on the count of selection on the slicer for month. I have another measure where i have put a condition that where my sales would be above 300 display it as 1 else 0. Now how do i sum up all the 1's in a measure.
Posting teh DAX below for more clarity :
Solved! Go to Solution.
Hi @gauri ,
You can create a measure as below:
New Measure =
VAR _tab =
SUMMARIZE (
'Table',
'Table'[groupfileds],
"dsales",
DIVIDE (
SUM ( sales[NetSales] ),
DATEDIFF ( MAX ( 'Calendar'[Start Year] ), MAX ( 'Calendar'[Date] ), MONTH ) + 1
)
)
RETURN
SUMX ( FILTER ( _tab, [dsales] >= 300 ), [Sales] )
If the above one is not applicable for your scenario, please provide some sample data of sales and Calendar table and your expected result with exact example or screenshot. Thank you.
Best Regards
Hi @gauri ,
You can create a measure as below:
New Measure =
VAR _tab =
SUMMARIZE (
'Table',
'Table'[groupfileds],
"dsales",
DIVIDE (
SUM ( sales[NetSales] ),
DATEDIFF ( MAX ( 'Calendar'[Start Year] ), MAX ( 'Calendar'[Date] ), MONTH ) + 1
)
)
RETURN
SUMX ( FILTER ( _tab, [dsales] >= 300 ), [Sales] )
If the above one is not applicable for your scenario, please provide some sample data of sales and Calendar table and your expected result with exact example or screenshot. Thank you.
Best Regards
@gauri , For that you need a grouo by or level of details where you can do that. It can be date customer, item
example
var b = countx(values(Sales[column]),IF(a>=300, 1, 0))
column is the column you have to replace
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
82 | |
65 | |
63 | |
56 |
User | Count |
---|---|
171 | |
111 | |
110 | |
72 | |
71 |