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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
madhas
Frequent Visitor

Column Variable

Hello, 

I have following variables:

 
VAR __exWDev=100
VAR __exWDev=GENERATESERIES(1,__exWDev)
I want to add a new column named "filteredModels" to this variable. This should takes the values in tbl_GG[Model], those that meet the condition U_RST[TEST_DATE]<"some specific date"
 
tbl_GG[Model] is itself a calculated column, and the data model looks below pic:
madhas_0-1675094871979.png

 

I used ADDCOLUMNS, but I have two problems:
1. I cannot access contents of tbl_GG through ADDCOLUMNS formula. I tried also RELATED, but it didn't work. I suspect that something is wrong with my data modeling.
2. I cannot figuer out how to implement this condition: U_RST[TEST_DATE]<"some specific date" in ADDCOLUMN formula. 
 
I didn't go further than this piece of string: VAR __exWDev1=ADDCOLUMNS(__exWDev,"filteredModels",)
 
Any sort of help is appreciated. 
 
Regards
3 REPLIES 3
madhas
Frequent Visitor

@MFelix Thanks for the reply. 

Unfortunately I cannot share the data. I understand what you mean, but thanks for the offer.

To your points:

  1. The dates should be iterated. What I wrote as "some specific date", is actually successive weeks of year. Writing the for loop is the next challenge for me. But at the first step I am trying to formulate what I want for a single week namely "some specific date" and then try to loop the formula through different weeks.
  2. that’s exactly why I post my question with a photo of the data model. I am new to Power BI and have no clear idea about pros and cons of cardinalities and filter flows. I thought bidirectional filter flow gives me more flexibility to implement more variety of filtering as it sounds like: "bidirectional". And I am wondering how someone without knowing exactly what kind of analysis comes down the road, can decide the on filter flow at very beginning of data modeling. For me the bidirectional seemed less restrictive, that's why I set it so. Apart from that I don't understand from your first point if it’s the bidirectional filter flow that could make issued or 1-1 cardinality. 

Regards

Hi @madhas ,

 

The questions about the relationships and the flexibility are many especially because DAX is based on context.

 

Check this video about the 1-to-1 and their issues.

https://www.sqlbi.com/tv/one-to-one-relationships-the-whiteboard-11/

 

The question you place is relevant how you can decide without knowing the future but there are some best practices that allow to have the flexibility keeping flexibility.

 

Also check this links about the bidirectionality

 

https://www.sqlbi.com/articles/bidirectional-relationships-and-ambiguity-in-dax/

 

Once again without any further information is difficult to give you a better help. If you want to reach out  please send a PM.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



MFelix
Super User
Super User

Hi @madhas ,

 

WIthout data is difficul to pin point the problem, however I have a couple of questions:

  • You refer you want to have the calculation based on a specific date, is that date being hard coded or is it by a slicer or a filter on a visual?
  • I can see that you have a 1-to-1 with bidirectional filter this always brings issues because of the potential ambiguity. Why are you using this logic?

Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.