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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
mb0307
Responsive Resident
Responsive Resident

Percetage in correct month

Hi all,

 

I have two dates from a fact table linked to Date table like this:

 

Calendar[Date] --> Table1[Requested Date] ---- Active relation

Calendar[Date] --> Table1[Invoice Date] ----- Inactive relation

 

Dax calculate total invoice quantity using inactive relation, like this:

 

Total Invoiced = 
    CALCULATE(
        SUM('Table1'[Invoice Qty]), 
        USERELATIONSHIP( 'Table'[Invoice Date], 'Calendar'[Date] )
        )

 

 

Then percentage is calculated:

 

% Invoice = DIVIDE([Total Invoiced], [Total Order Qty], 0)

 

 

All works fine but..

 

If I put % Invoice measure in a chart using Month Name (calendar table) in x-axis and use slicer for a country then it doesn't show all %ges in correct months. 

 

Total Invoiced measure works fine and show data in correct market and months.

 

Any solution please?

 

Many thanks

3 REPLIES 3
amitchandak
Super User
Super User

@mb0307 , You are fine [Total Order Qty] is working on the requested date?

 

Is market is coming from a dimension, if not make sure it is coming from a separate dimension

 

@amitchandak Thanks!

 

Yes, Total Order Qty is working on requested date.

Yes, market is coming from separate dimension table.

 

Still % is not falling in correct months on slicing data by market

 

 

Total Order Qty = CALCULATE(SUM('Table1'[Requested Quantity]), FILTER('Table1', 'Table1'[Reject Order] <> "Remove"))

 

Only green line comes in correct Month because both dates are october, but others show 0% because diff months?

Capture.PNG

 

Hi @mb0307 ,

 

Please change the chart to table visual and put all the measures in the table visual, this will let you know which measure goes wrong.

 

If you need more help, please share your pbix file with fake data and expect output.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.