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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

DAX bucket measure

Hi,

I have created a bucket for aging and would like to have this bucket as a dimenssion and a measure to counts the Job numbers, below is the measures I have:

--- measure 1

Awaiting Criteria =COUNTROWS('Job')
---- measure 2
Days since Meet & Greet Date =
Var TodayDate= NOW() +(11/24)
VAR Age=
DATEDIFF(
MIN(JobAnalysisViewEntry[Meet and Greet Local])
,
TodayDate, DAY)
Return
IF(HASONEVALUE('Job'[Job Number]), Age,BLANK())
 
2022-08-02_16-02-23.png
 
I would like to get this:
 
2022-08-02_16-14-32.png
 
I can't provide a pbxi file because I have a tabular model as the  data source.
 
Can help?
1 ACCEPTED SOLUTION
v-binbinyu-msft
Community Support
Community Support

Hi @Anonymous ,

1.Unfortunately, if you are using LC connection mode to connect to tabular model, cannot achieve your demands  in power BI by creating measure.

2.you may be able to achieve it directly in the AS model by add new column and table

    Add new column in “Job” table:

Days since Meet & Greet Date buckets =
SWITCH (
    TRUE (),
    [Days since Meet & Greet Date] > 100
        && [Days since Meet & Greet Date] < 160, "<1 Days",
    [Days since Meet & Greet Date] > 160
        && [Days since Meet & Greet Date] < 200, "1-2 Days",
    [Days since Meet & Greet Date] > 200, "3 Days"
)

vbinbinyumsft_0-1659606075880.png

     Add a new table:

Table =
SUMMARIZE (
    job,
    Job[Days since Meet & Greet Date buckets],
    "Count Jobs", COUNTROWS ( Job )
)

vbinbinyumsft_1-1659606142139.png

 

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
v-binbinyu-msft
Community Support
Community Support

Hi @Anonymous ,

1.Unfortunately, if you are using LC connection mode to connect to tabular model, cannot achieve your demands  in power BI by creating measure.

2.you may be able to achieve it directly in the AS model by add new column and table

    Add new column in “Job” table:

Days since Meet & Greet Date buckets =
SWITCH (
    TRUE (),
    [Days since Meet & Greet Date] > 100
        && [Days since Meet & Greet Date] < 160, "<1 Days",
    [Days since Meet & Greet Date] > 160
        && [Days since Meet & Greet Date] < 200, "1-2 Days",
    [Days since Meet & Greet Date] > 200, "3 Days"
)

vbinbinyumsft_0-1659606075880.png

     Add a new table:

Table =
SUMMARIZE (
    job,
    Job[Days since Meet & Greet Date buckets],
    "Count Jobs", COUNTROWS ( Job )
)

vbinbinyumsft_1-1659606142139.png

 

Best regards,
Community Support Team_ Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

the third measure is:

Days since Meet & Greet Date buckets =
SWITCH(TRUE(),
[Days since Meet & Greet Date] <=1, "<=1 Days",
[Days since Meet & Greet Date] >1 && [Days since Meet & Greet Date]<=2 , "1-2 Days",
[Days since Meet & Greet Date] >2 && [Days since Meet & Greet Date]<=3 , "2-3 Days",
[Days since Meet & Greet Date] >3 && [Days since Meet & Greet Date]<=4 , "3-4 Days",
[Days since Meet & Greet Date] >4 && [Days since Meet & Greet Date]<=5 , "4-5 Days",
[Days since Meet & Greet Date] >5 && [Days since Meet & Greet Date]<=6 , "5-6 Days",
[Days since Meet & Greet Date] >6 && [Days since Meet & Greet Date]<=7 , "6-7 Days",
[Days since Meet & Greet Date] >7 && [Days since Meet & Greet Date]<=8 , "7-8 Days",
[Days since Meet & Greet Date] >8 && [Days since Meet & Greet Date]<=9 , "8-9 Days",
[Days since Meet & Greet Date] >9 && [Days since Meet & Greet Date]<=10 , "9-10 Days",
[Days since Meet & Greet Date] >10 , ">10 Days"
)

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.