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.
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,
Solved! Go to Solution.
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
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)
5.Create a card and set the fields as the measure TotalValue_Monthly
6.Create a line chart and set X-axis as Date column, set Y-axis as value.
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)
6.Final output
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
Thanks a lot Albert, it worked for my report 😄
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
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)
5.Create a card and set the fields as the measure TotalValue_Monthly
6.Create a line chart and set X-axis as Date column, set Y-axis as value.
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)
6.Final output
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