The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello everyone, i have sample table like this picture:
I'll describe the table columns:
I've had a problem and it makes me stuck, i just want to show data from previous month whenever the month is changed (when the current month and date is February 1st, i want to show data from yesterday/last day of the month), is there any way to show it?
P.S. : I used date_for_visual for the slicer
The sample data
Table realationship
Using actual_date
Current condition
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
In the below sample, I tried to create last non blank value for fulfilled sales.
Last Non Blank fulfilled sales Value: =
VAR _SelectedDate =
MAX ( 'calendar'[Date] )
VAR _lastnonblankdate =
MAXX (
FILTER (
ADDCOLUMNS (
FILTER (
ALL('calendar'[Date]),
'calendar'[Date] <= _SelectedDate
),
"@metrics", CALCULATE ( SUM ( sales[fulfilled_sales] ) )
),
NOT [@metrics] == BLANK ()
),
'calendar'[Date]
)
RETURN
CALCULATE (
SUM ( sales[fulfilled_sales] ),
REMOVEFILTERS ( 'calendar' ),
'calendar'[Date] = _lastnonblankdate
)
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
In the below sample, I tried to create last non blank value for fulfilled sales.
Last Non Blank fulfilled sales Value: =
VAR _SelectedDate =
MAX ( 'calendar'[Date] )
VAR _lastnonblankdate =
MAXX (
FILTER (
ADDCOLUMNS (
FILTER (
ALL('calendar'[Date]),
'calendar'[Date] <= _SelectedDate
),
"@metrics", CALCULATE ( SUM ( sales[fulfilled_sales] ) )
),
NOT [@metrics] == BLANK ()
),
'calendar'[Date]
)
RETURN
CALCULATE (
SUM ( sales[fulfilled_sales] ),
REMOVEFILTERS ( 'calendar' ),
'calendar'[Date] = _lastnonblankdate
)
User | Count |
---|---|
24 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |