Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Dear Community,
I have 2 tables seems like not linked correctly.
1st table - I will select the one of Customers Current vs Previous OS
2nd table - Help me determine which product contribute to the largest OS movement, based on 1st table (this table has problem)
Please see my code and image for easy reference.
Previous OS
Current OS
Solved! Go to Solution.
Hi , @allenpee85
Sorry for late reply.
You need to create calendar table.
Here is a demo .
If help ,try steps as below.
1.create a calendar table .
Date = SELECTCOLUMNS(DISTINCT('Sales'[Month]),"Date",[Month])
2.using 'Date'[Date] instead of 'Sales'[Month] in measures
Current Month OS =
VAR _MaxMonth =
CALCULATE (MAX('Date'[Date]))
RETURN
CALCULATE(
SUM(Sales[OS]),
FILTER(ALLSELECTED(Sales[Month]),Sales[Month]=_MaxMonth))
Previous Month OS =
VAR _MinMonth =
CALCULATE (MIN('Date'[Date]), ALLSELECTED())
RETURN
CALCULATE(
SUM(Sales[OS]),
FILTER(ALL(Sales[Month]),Sales[Month]=_MinMonth))
And it will show as below:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi , @allenpee85
Can you show me the model relationship view here?
Best Regards,
Community Support Team _ Eason
Hi @v-easonf-msft , @tex628 ,
Sorry to keep you waiting.
I have created a sample file that exactly described my current situation for your kind investigation.
Raw Data - Below Filter result zero OS.
- Month (Feb-2020)
- Country (USA)
- Industry (Bike)
However, in PBI, I filtered the same as I did in Excel, both tables showing unexpected results.
Below is the link of my sample file.
https://drive.google.com/drive/folders/1lFnkRZARhoxmWNqXbOGAswhEnIQICmmH?usp=sharing
Thanks for your help.
Hi , @allenpee85
Sorry for late reply.
You need to create calendar table.
Here is a demo .
If help ,try steps as below.
1.create a calendar table .
Date = SELECTCOLUMNS(DISTINCT('Sales'[Month]),"Date",[Month])
2.using 'Date'[Date] instead of 'Sales'[Month] in measures
Current Month OS =
VAR _MaxMonth =
CALCULATE (MAX('Date'[Date]))
RETURN
CALCULATE(
SUM(Sales[OS]),
FILTER(ALLSELECTED(Sales[Month]),Sales[Month]=_MaxMonth))
Previous Month OS =
VAR _MinMonth =
CALCULATE (MIN('Date'[Date]), ALLSELECTED())
RETURN
CALCULATE(
SUM(Sales[OS]),
FILTER(ALL(Sales[Month]),Sales[Month]=_MinMonth))
And it will show as below:
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi!
Would you please post a picture of just maxmonth_ in the matrix that is problematic?
Current Month OS =
VAR _MaxMonth =
CALCULATE ( MAX( 'Date'[Month] ), ALLSELECTED())
RETURN
_MaxMonth
Also, the relationship between 'Combine' and 'Date' is it a double-crossfilter?
Br,
J
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |