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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

Need help in creating vizualization with slicer

Hi guys, I'm currently stucking in create a report, which shows number of sale. Assume that I have a data with a column date, and a column show number of sale. I want to create a report with a card name shows number of sale for a month, a line graph show number of sale for last 6 month. The value will change with a slicer, which is month, outside. The sample data and report is shown below.

Regards,

Nerdywantocode_1-1701705767403.png

 

Nerdywantocode_0-1701705708763.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Nerdywantocode ,

According to your sharing sample, here are my test process

To achieve your goal, you can follow these steps:

Here are my test data

vheqmsft_0-1701766952604.png

1.Create a measure by using DAX

 

 

TotalValue_Monthly = 
    CALCULATE(
        SUM('Table'[Value]),
        FILTER(
            ('Table'),
            'Table'[Month] = SELECTEDVALUE('Table (2)'[Month])
        )
    )

 

 

2.Create a table as the month of the date

 

 

Table (2) = VALUES('Table'[Date].[MonthNo])

 

 

 3.add a new column in table

 

 

Month = MONTH('Table'[Date])

 

 

4.Create a Slicer by using month column of table(2)

vheqmsft_1-1701767061762.png

5.Create a card and set the fields as the measure TotalValue_Monthly

vheqmsft_2-1701767079928.png

6.Create a line chart and set X-axis as Date column, set Y-axis as value.

vheqmsft_3-1701767100038.png

7.Create another and set to the filter of this visual(line chart), and set options as ‘is 1’

 

 

Measure = 
VAR SelectedMonth = SELECTEDVALUE('Table (2)'[Month])
RETURN
IF(
    MAX('Table'[Month]) <= SelectedMonth, 1, 0)

 

 

 

vheqmsft_4-1701767142506.png

6.Final output

vheqmsft_5-1701767155700.png

In order for you to solve the problem faster, you can refer to the following documentation

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

Best Regards,

Albert He 


 

View solution in original post

2 REPLIES 2

Thanks a lot Albert, it worked for my report 😄

Anonymous
Not applicable

Hi @Nerdywantocode ,

According to your sharing sample, here are my test process

To achieve your goal, you can follow these steps:

Here are my test data

vheqmsft_0-1701766952604.png

1.Create a measure by using DAX

 

 

TotalValue_Monthly = 
    CALCULATE(
        SUM('Table'[Value]),
        FILTER(
            ('Table'),
            'Table'[Month] = SELECTEDVALUE('Table (2)'[Month])
        )
    )

 

 

2.Create a table as the month of the date

 

 

Table (2) = VALUES('Table'[Date].[MonthNo])

 

 

 3.add a new column in table

 

 

Month = MONTH('Table'[Date])

 

 

4.Create a Slicer by using month column of table(2)

vheqmsft_1-1701767061762.png

5.Create a card and set the fields as the measure TotalValue_Monthly

vheqmsft_2-1701767079928.png

6.Create a line chart and set X-axis as Date column, set Y-axis as value.

vheqmsft_3-1701767100038.png

7.Create another and set to the filter of this visual(line chart), and set options as ‘is 1’

 

 

Measure = 
VAR SelectedMonth = SELECTEDVALUE('Table (2)'[Month])
RETURN
IF(
    MAX('Table'[Month]) <= SelectedMonth, 1, 0)

 

 

 

vheqmsft_4-1701767142506.png

6.Final output

vheqmsft_5-1701767155700.png

In order for you to solve the problem faster, you can refer to the following documentation

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

Best Regards,

Albert He 


 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.