Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
hi everyone
hope you are healthy
i've problem to comparing actual monthly vs actual daily in 1 chart.
is it possible to make 1 chart with a combination of monthly and daily?
Solved! Go to Solution.
Hi,
Please check the attached pbix file.
I created a new Axis table, and applied the below measure.
Qty total expected result: =
VAR _currentmonthend =
MAX ( 'Calendar'[Date] )
VAR _previousmonthend =
EOMONTH ( _currentmonthend, -1 )
RETURN
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Axis table'[Monthkey] ) = _previousmonthend,
CALCULATE (
SUM ( Data[Quantity] ),
FILTER ( ALL ( 'Calendar' ), 'Calendar'[End of Month] = _previousmonthend )
),
CALCULATE (
SUM ( Data[Quantity] ),
KEEPFILTERS (
FILTER (
ALL ( 'Calendar'[Date] ),
'Calendar'[Date] = MAX ( 'Axis table'[Datekey] )
)
)
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi @Anonymous
I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.
If you need more help, please let me know.
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
awesome Kim,
thanks for help me
but if I use this code - SELECTEDVALUE ( 'Axis create'[Required axis] ) = "January" -the report it can be static. what if the month changes (Jan to Feb, Feb to Mar, Mar to Apr etc)? can I use code previous month Kim?
Hi,
Thank you for your feedback.
May I ask how the current month is selected on the report page? Is it selected by a slicer selection on the report page? Or, do you want to show all months and dates on one visualization?
Or, please share your sample pbix file's link here, and then I can try to come up with a more accurate solution.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
May I ask how the current month is selected on the report page?
only two months, in chart I want to show previous month (month to date) and current month (daily)
Is it selected by a slicer selection on the report page?
yes Kim, for current month I want to choose the date I like
do you want to show all months and dates on one visualization?
only prev month and daily current month
Hi,
Please check the attached pbix file.
I created a new Axis table, and applied the below measure.
Qty total expected result: =
VAR _currentmonthend =
MAX ( 'Calendar'[Date] )
VAR _previousmonthend =
EOMONTH ( _currentmonthend, -1 )
RETURN
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Axis table'[Monthkey] ) = _previousmonthend,
CALCULATE (
SUM ( Data[Quantity] ),
FILTER ( ALL ( 'Calendar' ), 'Calendar'[End of Month] = _previousmonthend )
),
CALCULATE (
SUM ( Data[Quantity] ),
KEEPFILTERS (
FILTER (
ALL ( 'Calendar'[Date] ),
'Calendar'[Date] = MAX ( 'Axis table'[Datekey] )
)
)
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope this can provide some ideas on how to create a solution for your data model.
Qty total expected result: =
IF (
SELECTEDVALUE ( 'Axis create'[Required axis] ) = "January",
CALCULATE (
SUM ( Data[Quantity] ),
TREATAS ( VALUES ( 'Axis create'[Key] ), 'Calendar'[End of Month] )
),
CALCULATE (
SUM ( Data[Quantity] ),
TREATAS ( VALUES ( 'Axis create'[Key] ), 'Calendar'[Date] )
)
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
12 | |
10 | |
9 | |
9 |
User | Count |
---|---|
17 | |
14 | |
12 | |
10 | |
9 |