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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PreetiSahu321
Helper I
Helper I

Sales for Auto select current month in Gauge

Hello Power BI Community,

 

Recently I was working with Power BI DAX. As per my requirement, I have an Order list and I have some columns like Net value, Net price where the Data type is the Whole number.

 

Here, I want to show the total net value for the latest or current month using DAX. Let's take an example to make it clear.

As per my requirement, I want to show the total order or net value in the current month (from 1st to 31st) which will be auto select. Similarly, in the next month also, it will show me the total net value by auto-selected.

 

For this purpose, I have created 2 measures:

1. To retrieve the current month:

Current Month = max('Calendar'[year_month])

 

2. To get the total net value for current month:

sales for current month = VAR Current_Month = [Current Month] RETURN CALCULATE (SUM (Orders[Net value]), FILTER (ALL ( 'Calendar'[year_month] ), 'Calendar'[year_month] = Current_Month ), Orders[Name1]="Orders")

 

After creating two measures, when I am selecting the Gauge chart from the Visualization, at that time I cant see my total net value for the current month which you can see in the below screenshot.

 

1.png

 

Can anyone suggest to me that what I can do anything else if my DAX is correct?

 

Thanks in Advance !!!

 

0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors