Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello
I am begginers in DAX. Please help me to solve my problem.
Below you can see report from database:
Solved! Go to Solution.
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]
)
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
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]
)
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
@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
User | Count |
---|---|
54 | |
22 | |
19 | |
16 | |
11 |
User | Count |
---|---|
81 | |
55 | |
39 | |
20 | |
12 |