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

Double Values

Hello

I need help on a table.

I would like to add a calculated column that gives me back a D or R value.
R if the value is not double.
D if the value is doubled

Here are the columns

id usersRoomYearColumn measured
id11112010 
id33312010 
id111112011D
id33322011R

 

i know the algorithm, but i dont scrive this in dax

i must to look if my room users is same than one year ago, if yes the result will be D or not then result is R

 

i think to use parallellperiod or sameperiodlast year, but i'm blocked on filter to use that

 

Sorry for my english

 

i hope someone will can to help me

 

Regards

 

1 ACCEPTED SOLUTION

Thx for you help, i just modified year +1 on year -1 for result D on first... in my case.. room student...

For understand, if i want compare two values, i must to create variable if i want filter? 

View solution in original post

3 REPLIES 3
v-xiaotang
Community Support
Community Support

Hi @Yannick_M 

Thanks for reaching out to us.

I just want to confirm if you resolved this issue? If yes, you can accept the answer helpful as the solution or share you method and accept it as solution, thanks for your contribution to improve Power BI.

If you need more help, please let me know.

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

FreemanZ
Super User
Super User

Hi @Yannick_M 

you can try to create a new column with this:

Column =
VAR CurrentID = TableName[ID]
VAR CurrentRoom = TableName[Room]
VAR CurrentYear = TableName[Year]
VAR _count=
COUNTROWS(
    FILTER(
        TableName,
        CurrentID = TableName[ID]
            &&CurrentRoom = TableName[Room]            
            &&CurrentYear = TableName[Year]+1
    )
)
RETURN IF(_count=1, "D","R")

i tried and it worked like this:

FreemanZ_0-1670417266518.png

 

Thx for you help, i just modified year +1 on year -1 for result D on first... in my case.. room student...

For understand, if i want compare two values, i must to create variable if i want filter? 

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.