Forum Discussion
DAX Measure won't return a proper result
Hi,
I'm struggle with this easy measure and I can't figure it out what's wrong. I've tried all filters combinations and still get the same result as soon as I add hours intervals. See pictures below:
That's the measure I use atm for Sales Qty
VAR vFilterContext =
FLOOR (
LOG10 (
SIGN(ISCROSSFILTERED ( 'Merchandise Structure') +
ISCROSSFILTERED ( 'Articles') +
ISCROSSFILTERED ( 'Product Lists') +
ISCROSSFILTERED ( 'Promo Classification' ) +
ISCROSSFILTERED ( 'Sales Classification' )) * 10 + 1
),
1
)
VAR vResult =
SWITCH (
vFilterContext,
0, SUM('POS Sales'[Sales Qty]),
1, SUM('Sales'[Sales Qty])
)
RETURN
vResult
Also, I've tried different measures using all filter functions so far. What am I doing wrong?
Please, help!
Thank you!
11 Replies
- amitchandak
Super User
AndreiK15 , what are you trying to achieve here ?
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- AndreiK15
Helper II
amitchandakI am trying to get Sales Qty per hour intervals for each category on the left and their totals. I can't share a sample as I'm connected to SASS and a sample won't make a difference. I've made a screenshot with a matrix and relationships between pos sales (from where I get sales qty) and pos hours from where I get hours intervals. Also, the main measure I use to get sales qty (which can be changed if necessary).
Thanks!
- PaulDBrown
Community Champion
can't you replicate the tables with sample data in Excel and post them?
- AndreiK15
Helper II
- PaulDBrown
Community Champion
We need actual raw data!