cancel
Showing results for
Did you mean:

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Frequent Visitor

## line chart and trend chart between two dates

Hi all 🙂

I created a line chart and a metrics chart where values change based on two selected dates.
For the two dates, I created two from & to tables with columns for each.
Then I created a measure to get the values I wanted.
The line chart came out just as I wanted.
However, the metrics chart looks like the image below.
The first month doesn't show the previous month's value and the last month adds an extra month.

I'll attach the file : pbix

Please let me know how to fix it if you can.

Thanks

1 ACCEPTED SOLUTION
Super User

Hi,

Please check the below image and the attached pbix file.

Thank you.

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.

7 REPLIES 7
Super User

Hi,

Please check the below image and the attached pbix file.

Thank you.

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.

Frequent Visitor

can i ask one more thing??

i modify ratio dax to show ratio like ▲ 13.5 %

but all date columm shown like bwelow image

my modified dax

ratio =
var _Alpha = DIVIDE ( ( [@_trend_cnt] - [@_trend_cnt_pm] ), [@_trend_cnt_pm] )
var _Beta = ABS(_Alpha)

RETURN
IF(_Alpha > 0, FORMAT(_Beta,"▲ #,##0.0"), FORMAT(_Beta,"▼ #,##0.0"))
Super User

Hi,

``````ratio =
var _Alpha = DIVIDE ( ( [@_trend_cnt] - [@_trend_cnt_pm] ), [@_trend_cnt_pm] )
var _Beta = ABS(_Alpha)

RETURN
IF(_Alpha > 0, FORMAT(_Beta,"▲ #,##0.0%"), FORMAT(_Beta,"▼ #,##0.0%"))``````

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.

Frequent Visitor

Hi
Modifying the dax will turn it into text and show all dates in the column.

Super User

Hi,

``````ratio =
VAR _Alpha =
DIVIDE ( ( [@_trend_cnt] - [@_trend_cnt_pm] ), [@_trend_cnt_pm] )
VAR _Beta =
ABS ( _Alpha )
RETURN
IF (
NOT ISBLANK ( _Alpha ),
IF (
_Alpha > 0,
FORMAT ( _Beta, "▲ #,##0.0%" ),
FORMAT ( _Beta, "▼ #,##0.0%" )
)
)
``````

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.

Frequent Visitor

it works!!
I couldn’t have done it without your help

really thank you 🙂

Frequent Visitor

Thanks again 🙂

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors