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
Artur_Red
New Member

new measure

Hello

 

I am begginers in DAX. Please help me to solve my problem.

 

Below you can see report from database:

  • [Kontrahent Nazwa] - name of client
  • [M-c Operacji] - month (is not a date, it is a numebr in database)
  • [Cena sprzedaży netto [tys. zł]] - sum od sells by (filer by [Kontrahent Nazwa] and [M-c Operacji])
  • I want to add new measure, which will count [Cena sprzedaży netto [tys. zł]] by [Kontrahent Nazwa] & [M-c Operacji] + 1

dax.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Artur_Red ,

You can create a measure as below to get the sum sells for next month, please find the details in the attachment.

 

Sells for next month = 
VAR _selclient =
    SELECTEDVALUE ( 'Table'[Kontrahent Nazwa] )
VAR _selmonth =
    SELECTEDVALUE ( 'Table'[M-c Operacji] )
RETURN
    SUMX (
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Kontrahent Nazwa] = _selclient
                && 'Table'[M-c Operacji] = _selmonth + 1
        ),
        [Sum of sells]
    )

 

yingyinr_0-1666082517067.png

If the above one can't help you get the desired result, please provide some sample data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. And share the visual field settings as below screenshot. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Artur_Red ,

You can create a measure as below to get the sum sells for next month, please find the details in the attachment.

 

Sells for next month = 
VAR _selclient =
    SELECTEDVALUE ( 'Table'[Kontrahent Nazwa] )
VAR _selmonth =
    SELECTEDVALUE ( 'Table'[M-c Operacji] )
RETURN
    SUMX (
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[Kontrahent Nazwa] = _selclient
                && 'Table'[M-c Operacji] = _selmonth + 1
        ),
        [Sum of sells]
    )

 

yingyinr_0-1666082517067.png

If the above one can't help you get the desired result, please provide some sample data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples. And share the visual field settings as below screenshot. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

amitchandak
Super User
Super User

@Artur_Red , if you need next month data use date table and time intelligence. Date table should be joined with date of your tables

 

example

Month ahead Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],1,Month))

next month Sales = CALCULATE(SUM(Sales[Sales Amount]),nextmonth('Date'[Date]))

next MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],1,MONTH)))

 

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

DAX Calendar - Standard Calendar, Non-Standard Calendar, 4-4-4 Calendar
https://www.youtube.com/watch?v=IsfCMzjKTQ0&t=145s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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