The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Experts,
I am new in Power BI, I have developed a report on the report i want to add an field of numbers this number field should filter the on the reference to exist Date field as this number of days will not show past . As the user enter a number let say 20 it will show 20 days later data not "Past". It will show only future data from this number of day field and current (i.e Today) date.Please help!
Best Regards,
Shabir Ahmad
Solved! Go to Solution.
Hi @shabirAhmad,
You can create a what if parameter table with number values, then you can use it as source of slicer. After these steps, you can create a measure formula to extract the selection to calculate with current row context data.
Use parameters to visualize variables - Power BI | Microsoft Learn
formula =
VAR selection =
MAX ( WhatIF[Value] )
VAR currDate =
MAX ( Table[Date] )
RETURN
DATE ( YEAR ( currDate ), MONTH ( currDate ), DAY ( currDate ) + selection )
Regards,
Xiaoxin Sheng
Hi @shabirAhmad,
You can create a what if parameter table with number values, then you can use it as source of slicer. After these steps, you can create a measure formula to extract the selection to calculate with current row context data.
Use parameters to visualize variables - Power BI | Microsoft Learn
formula =
VAR selection =
MAX ( WhatIF[Value] )
VAR currDate =
MAX ( Table[Date] )
RETURN
DATE ( YEAR ( currDate ), MONTH ( currDate ), DAY ( currDate ) + selection )
Regards,
Xiaoxin Sheng
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |