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
LangeJan
Helper I
Helper I

Table rows from measure not correct - Total amount correct

Hi
I work for a bookstore will show how much of the turnover is sold in hard copy format ('Papir' in Danish).

I have made the measure below. The total amount is correct (PFD not included), but in the table I can also see rows including PDF even though PDF is not counted in the total.
PDF is only displayed in the table in cases where the same item number is sold in both PDF and hardcopy on the same order number.
Can anyone answer how I get PDF off the table?

Thank you


Turnover PAPIR =
CALCULATE(SUM('AX_CUSTINVOICETRANS'[LINEAMOUNTMST]);'AX_CUSTINVOICETRANS'[DS_PUBFORM]="papir")

Skærmbillede 2021-12-30 210646.png

 
1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@LangeJan  try this

Turnover PAPIR =
CALCULATE (
    SUM ( 'AX_CUSTINVOICETRANS'[LINEAMOUNTMST] ),
    FILTER (
        VALUES ( 'AX_CUSTINVOICETRANS'[DS_PUBFORM] ),
        'AX_CUSTINVOICETRANS'[DS_PUBFORM] = "papir"
    )
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

3 REPLIES 3
smpa01
Super User
Super User

@LangeJan  try this

Turnover PAPIR =
CALCULATE (
    SUM ( 'AX_CUSTINVOICETRANS'[LINEAMOUNTMST] ),
    FILTER (
        VALUES ( 'AX_CUSTINVOICETRANS'[DS_PUBFORM] ),
        'AX_CUSTINVOICETRANS'[DS_PUBFORM] = "papir"
    )
)
Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Thanks @smpa01 - this solution solved my problem exactly as I wanted it.

ValtteriN
Super User
Super User

Hi,

I think the most straightforward solution is to filter DS_DUBFORM on a visual level so either just place a filter here: 

ValtteriN_0-1640897627999.png



Or include a slicer selection on your report and use a simple dax like:
Revenue = SUM('AX_CUSTINVOICETRANS'[LINEAMOUNTMST])

If there isn't any specific reason to hard-code your product category selection I would stick to a slicer selection or a filter.

E.g. Slicer (in your example place 'AX_CUSTINVOICETRANS'[DS_PUBFORM] in the slicer)

ValtteriN_1-1640897763150.png



I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!







Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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