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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
crispybc
Frequent Visitor

Parametrized Date in DAX Created Sankey Table

I have created a Sankey table using DAX which is basically  just SOURCE, DESTINATION, WEIGHT (Summarised ticket data at different states).

 

I have a variable date set up to filter the data for tickets created after the variable date, however I want to make this date value changable outside of the DAX. I have not been able to figure out how to do this.

 

Here is a very dumbed down example of the DAX:

CX-JOURNEY = VAR from_date = DATEVALUE("2022-07-01")
RETURN
{
(
"PRE-SALES",
"SUPPORT",
CALCULATE(COUNTROWS(CONVERSATIONS), CONVERSATIONS[CREATED_AT] > from_date && CONVERSATIONS[GROUP]="Pre-Sales Engineers")
),
(
"SUPPORT",
"RND",
CALCULATE(COUNTROWS(CONVERSATIONS), CONVERSATIONS[CREATED_AT] > from_date && CONVERSATIONS[GROUP]="SUPPORT" )
)
}

 

Basically the goal is to have from_date selectable from outside the visual and have the Sankey visual update based on the selected date.

2 REPLIES 2
crispybc
Frequent Visitor

Hi @amitchandak 

It seems to not be able detect the values within the table.

 

TEST = VAR from_date = SELECTEDVALUE(Date2[Date])
RETURN
{
(
"PRE-SALES",
"SUPPORT",
CALCULATE(COUNTROWS(CONVERSATIONS), CONVERSATIONS[CREATED_AT] > from_date && CONVERSATIONS[GROUPS]="Pre-Sales Engineers"),
from_date
),
(
"SUPPORT",
"RND",
CALCULATE(COUNTROWS(CONVERSATIONS), CONVERSATIONS[CREATED_AT] > from_date && CONVERSATIONS[GROUPS]="SUPPORT" ),
from_date
)
}

 I added from_date as a 4th value to the table and it returns null values. I confirm the date slicer works with a simple measure. 

Measure = SELECTEDVALUE(Date2[Date])

crispybc_0-1669207521857.png

But it does not work within table creation dax.

 

 

 

crispybc_1-1669207763569.png

 

Any Ideas?

amitchandak
Super User
Super User

@crispybc , Create an independent date table and then use

 

selectedvalue(Date1[Date])

 

or

 

maxx(allselected(Date1),[Date])

 

in place of static date

 

Just for reference

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.