Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
miinseon
Helper I
Helper I

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 

 

miinseon_0-1715914212489.png

 

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

Thanks

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below image and the attached pbix file.

Thank you.

 

Jihwan_Kim_0-1715917482984.png

 


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.


Click here to visit my LinkedIn page

View solution in original post

7 REPLIES 7
Jihwan_Kim
Super User
Super User

Hi,

Please check the below image and the attached pbix file.

Thank you.

 

Jihwan_Kim_0-1715917482984.png

 


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.


Click here to visit my LinkedIn page

can i ask one more thing??

i modify ratio dax to show ratio like ▲ 13.5 %

but all date columm shown like bwelow image

miinseon_0-1715919884260.png

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"))

Hi,

Please try adding %, something like below, whether it suits your requirement.

 

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.


Click here to visit my LinkedIn page

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

miinseon_0-1716165498011.png

 

Hi,

Please try something like below.

 

Jihwan_Kim_0-1716186253574.png

 

 

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.


Click here to visit my LinkedIn page

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

really thank you 🙂

Thanks again 🙂

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.